Bug 680779 - Fall back to single file chooser on Android for input[type=file multiple]. r=blassey
authorMatt Brubeck <mbrubeck@mozilla.com>
Mon, 22 Aug 2011 10:37:18 -0700
changeset 75665 452d6e41403297b509498d364e3cf01aead59497
parent 75664 1ee70d6bb2c8ce742aa6171b00d0c765537e7597
child 75666 14ebdc83383736e491333f88e5a3e468cefa7f6c
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersblassey
bugs680779
milestone9.0a1
Bug 680779 - Fall back to single file chooser on Android for input[type=file multiple]. r=blassey
widget/src/android/nsFilePicker.cpp
--- a/widget/src/android/nsFilePicker.cpp
+++ b/widget/src/android/nsFilePicker.cpp
@@ -40,17 +40,20 @@
 #include "nsNetUtil.h"
 #include "nsIURI.h"
 
 NS_IMPL_ISUPPORTS1(nsFilePicker, nsIFilePicker)
 
 NS_IMETHODIMP nsFilePicker::Init(nsIDOMWindow *parent, const nsAString& title, 
                                  PRInt16 mode)
 {
-    return nsIFilePicker::modeOpen == mode ? NS_OK : NS_ERROR_NOT_IMPLEMENTED;
+    return (mode == nsIFilePicker::modeOpen ||
+            mode == nsIFilePicker::modeOpenMultiple)
+        ? NS_OK
+        : NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP nsFilePicker::AppendFilter(const nsAString& /*title*/,
                                          const nsAString& filter)
 {
     if (!mFilters.IsEmpty())
         mFilters.AppendLiteral(", ");
     mFilters.Append(filter);