targetSdkVersion=23 and runtime permissions

Sebastian Kaspari s.kaspari at gmail.com
Tue Jan 19 11:18:32 UTC 2016


Good news, everyone! [1]

I just pushed a pile of patches to fx-team that set targetSdkVersion=23 and
add basic support for runtime permissions[2] (bug 1212830 [3]). (Please
don't get backed out..)

It's likely that I broke things. Help testing this is highly appreciated!
Browsing itself doesn't need any of the permissions, so most users
shouldn't even notice a difference. Additionally users updating the app
from a version with install-time permissions will keep all permissions and
do not need to grant any permissions again. So if you want to see this in
action you either need to re-install the app or manually withdraw the
permissions in Android's settings.

Please file bugs blocking meta bug 1212830 [3]. As I said support for
runtime permissions is very basic. This means I didn't add any additional
strings or UI elements. I filed meta bug 1239284 [4] to track ideas how
this can be improved. There aren't any bugs linked to this bug yet, but I'm
going to file some now.

Fennec developers: If your code requires a dangerous permission (Currently
that's Storage, Location, Camera or Microphone in Fennec) then you have to
take care of checking or requesting the permission. I wrote some helpers
for that. For now have look at Permissions.java and my patches:
https://hg.mozilla.org/integration/fx-team/pushloghtml?changeset=6650b8b32897

Add-on developers: Add-ons that might touch code that requires certain
permissions might need to do a permission check themselves
(RuntimePermissions.jsm). I didn't test add-ons thoroughly and the
JavaScript module only covers use cases we have in Fennec itself. (This
might need a more broader notification of developers.
mozilla.dev.extensions?)

Best,
Sebastian

[1] https://www.youtube.com/watch?v=7WZJGTGLuOk
[2] http://developer.android.com/training/permissions/requesting.html
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1212830
[4] https://bugzilla.mozilla.org/show_bug.cgi?id=1239284
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/mobile-firefox-dev/attachments/20160119/05580557/attachment.html>


More information about the mobile-firefox-dev mailing list