Bug 1496079 cannot view files due to missing READ_STORAGE_PERMISSION r=JanH
authorAndrei Lazar <andrei.a.lazar@softvision.ro>
Wed, 03 Oct 2018 14:36:51 +0000
changeset 495149 9b019dd902c45f9d40fa5f9d5c2da6fcb5a0467f
parent 495148 a42437c2e1fe656e5573c7951c1d50298d8a2f45
child 495150 8660ad891a23c389512aa8d9d1fb122096df6741
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersJanH
bugs1496079
milestone64.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 1496079 cannot view files due to missing READ_STORAGE_PERMISSION r=JanH Fixed the issue where the read storage permission was not requested due to a typo. Differential Revision: https://phabricator.services.mozilla.com/D7608
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -4205,17 +4205,17 @@ Tab.prototype = {
           let error = docURI.search(/e\=/);
           let duffUrl = docURI.search(/\&u\=/);
           let errorExtra = decodeURIComponent(docURI.slice(error + 2, duffUrl));
           // Here is a list of errorExtra types (et_*)
           // http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/netError.xhtml#287
           if (errorExtra == "fileAccessDenied") {
             // Check if we already have the permissions, then - if we do not have them, show the prompt and reload the page.
             // If we already have them, it means access to file was denied.
-            RuntimePermissions.checkPermission(RuntimePermissions.READ_EXTERNAL_STORAGE).then((permissionAlreadyGranted) => {
+            RuntimePermissions.checkPermissions(RuntimePermissions.READ_EXTERNAL_STORAGE).then((permissionAlreadyGranted) => {
               if (!permissionAlreadyGranted) {
                 RuntimePermissions.waitForPermissions(RuntimePermissions.READ_EXTERNAL_STORAGE).then((permissionGranted) => {
                   if (permissionGranted) {
                     this.browser.reload();
                   }
                 });
               }
             });