Closed Bug 1169359 Opened 7 years ago Closed 6 years ago

Investigate Fx Android interactions with Android M permission disabling


(Firefox for Android Graveyard :: General, defect)

Not set



Tracking Status
fennec 40+ ---


(Reporter: kbrosnan, Assigned: sebastian)




Android M will ship with permission controls for apps. We need to check what happens when the user disables the the permission and triggers that codepath. Includes search activity and GeckoView. Need to test Flash as well (assuming we continue to support it in this version of Android).
I think this may depend on building with a newer SDK after more reading.
Blocks: android-m
Assignee: nobody → s.kaspari
Some learnings so far:

* The app will need to target the M developer preview in order to use any of the new permission APIs. As long as we don't do that the user will have to grant all permissions at install time.
* The user can still revoke (some) permissions from the app (A dialog will warn the user that this app was designed for an older version and might not be able to handle revoking of permissions).
* Using the current Nightly version I can only revoke the following permissions (or groups of permissions): Contacts, Camera, Location and Microphone.

As soon as we target M or higher in our builds:

* Permissions still need to be defined in the manifest (probably for backwards compatibility)
* Permissions can be revoked at any time. Therefore the permissions need to be checked before accessing anything that needs a permission.
* The lack of a permission needs to be handled in the UI.

This one is interesting:

* With M all permissions with protection level "normal" are granted to any app at install time. One example is the INTERNET permission that will be granted to any app without requesting it (and it seems like these permissions also can't be revoked)

* Some permissions' protection levels have been downgraded from "dangerous" to "normal" in M (with the INTERNET permission being one example). I generated a list of all the permissions and their protection level before and after M:
 * Android 5.1.1:
 * Android M-Preview:
Let's make sure we don't crash. We probably need to track this with 40, so we can match any Android M release.
tracking-fennec: ? → 40+
(In reply to Mark Finkle (:mfinkle) from comment #3)
> Let's make sure we don't crash. We probably need to track this with 40, so
> we can match any Android M release.

I have revoked all permissions (Contacts, Camera, Location, Microphone) from Nightly on my daily driver phone since some days and didn't notice any problems so far.

I did some basic black box testing (e.g. browsing Google Maps website with location permission disabled) and it seems like these situations are handled quite smart by the OS: Location permission revoked -> Location not available like if GPS is not available, Contacts permission revoked -> No contacts on phone. But I definitely didn't trigger all code paths that requires these permissions.
Related (but no crash): Bug 1181881 - Disabling Location is not user friendly - Android M
I did some additional testing with the new released M Preview 2, Firefox Beta (40.0) and disabled permissions: Camera, Location, Microphone.

* LOCATION: Google Maps: We show the popup asking whether the user wants to share the location. After accepting and waiting some time Maps will show an error: "Google Maps could not determine your precise location". No crash but the user does not know what's going on and we probably want to ask for the permission. This is handled by bug 1181881.

* CAMERA & MICROPHONE: Firefox Hello: The user is asked whether the microphone should be shared with the website. After accepting the website shows an error: "Something went wrong". After granting just the microphone permission but not the camera permission I am able to join the conversation without a video stream. I created bug 1184033 to evaluate how we could make this nicer.
Closing now as I don't know what to investigate more for now. There's no obvious crash that we need to fix but we should look into bug 1181881 and bug 1184033 so that people can recover from revoked permissions that they want to grant websites. According to the Android developer website there will be a near-final Preview 3 in a month. I'll re-test with that to see if there are any new issues.
Closed: 6 years ago
Resolution: --- → FIXED
See Also: → 1195663
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.