Closed
Bug 1395996
Opened 8 years ago
Closed 4 years ago
Eliminate unnecessary permissions requests in FilePicker
Categories
(Firefox for Android Graveyard :: General, enhancement, P3)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: droeh, Unassigned)
References
Details
Go to send.firefox.com with all permissions disabled on Fennec and click "Select a file to upload"
Expected behavior: Only necessary permissions are requested (eg, Camera permissions are requested only if you're going to upload directly from a camera app, External Storage permissions are requested only if you're uploading a file on external storage, etc.)
Actual behavior: Camera, Microphone, and External Storage permissions are requested before the activity chooser is shown.
Comment 1•8 years ago
|
||
Some random thoughts:
- Microphone permission won't be required unless we implement our own sound recorder for the file picker (bug 1410975)
- The external storage permission could probably be requested on demand if we get back a file:// URI that we cannot open - in that case we could try requesting the permission and then try again.
- The camera permission is more difficult, because with the current setup we need to obtain the permission *before* handing the file chooser intent to the OS, but on the other hand we don't know whether we this is really necessary or not until the user actually decides to use the camera from that dialogue, by which time it is too late for requesting the permission.
We'd probably have to implement our own dialogue using an intent picker or something like that (so that the OS doesn't automatically launch the chosen activity and instead hands the user-selected intent back to us), so we could intercept the selected intent and request any necessary permissions before starting the chosen activity.
The good news is that Chrome isn't any wiser than us here - when opening the file picker, they too request the camera permission just in case.
Comment 2•8 years ago
|
||
(In reply to Jan Henning [:JanH] from comment #1)
> - The camera permission is more difficult, because with the current setup we
> need to obtain the permission *before* handing the file chooser intent to
> the OS, but on the other hand we don't know whether we this is really
> necessary or not until the user actually decides to use the camera from that
> dialogue, by which time it is too late for requesting the permission.
Isn't the camera permission required to use the camera *directly*?
e.g. in the case of WebRTC communication, for example? In the case of filepicking to upload a file, this should open the app selector and even if user pick camera, I think it's gonna take a picture, save it and get it as a file, right?
Comment 3•8 years ago
|
||
No, in the cause of Images/Videos, this also applies for taking a new photo/video through a 3rd party app. The documentation [1] says "Note: if you app targets M and above and declares as using the CAMERA permission which is not granted, then attempting to use this action will result in a SecurityException." and I've also tried it anyway and it doesn't work.
[1] https://developer.android.com/reference/android/provider/MediaStore.html#ACTION_IMAGE_CAPTURE, respectively https://developer.android.com/reference/android/provider/MediaStore.html#ACTION_VIDEO_CAPTURE
[triage] Chrome also does this and it's non-trivial to fix: see comment 1.
Priority: -- → P3
Comment 5•4 years ago
|
||
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
| Assignee | ||
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•