Bug 935273 - B2G filePicker.js uses nocrop when no filters are set. r=dflanagan
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 03 Dec 2013 15:44:45 -0500
changeset 158715 482e84753f3260a0a0c629ef5b4cc72116bda25a
parent 158607 82dd6c40effc57efda16deb26194dc76890bb081
child 158716 7da6412ef0359464902462df5a2e6459415cb40f
push id25754
push usercbook@mozilla.com
push dateWed, 04 Dec 2013 08:48:02 +0000
treeherdermozilla-central@9688476c1544 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdflanagan
bugs935273
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 935273 - B2G filePicker.js uses nocrop when no filters are set. r=dflanagan
b2g/components/FilePicker.js
--- a/b2g/components/FilePicker.js
+++ b/b2g/components/FilePicker.js
@@ -98,17 +98,20 @@ FilePicker.prototype = {
     if (filterMask & Ci.nsIFilePicker.filterVideo) {
       this.mFilterTypes = this.mFilterTypes.concat(VIDEO_FILTERS);
     }
 
     if (filterMask & Ci.nsIFilePicker.filterAudio) {
       this.mFilterTypes = this.mFilterTypes.concat(AUDIO_FILTERS);
     }
 
-    // Ci.nsIFilePicker.filterAll is by default
+    if (filterMask & Ci.nsIFilePicker.filterAll) {
+      // This property is needed for the gallery app pick activity.
+      this.mExtraProps['nocrop'] = true;
+    }
   },
 
   appendFilter: function(title, extensions) {
     // pick activity doesn't support extensions
   },
 
   open: function(aFilePickerShownCallback) {
     this.mFilePickerShownCallback = aFilePickerShownCallback;