Restricted Profiles: Make restrictions configurable by device admin

VERIFIED FIXED in Firefox 42

Status

()

defect
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: sebastian, Assigned: sebastian)

Tracking

Trunk
Firefox 42
All
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 verified)

Details

Attachments

(2 attachments)

Android's Restricted Profiles allow the device owner to configure the restrictions of an app[1] - if supported by the app.

KidFox: Instead of only hard-coding all the restrictions we could allow the parent to toggle the restrictions (system UI) as needed.

[1]: https://developer.android.com/about/versions/android-4.3.html#RestrictedProfiles
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
This is a screenshot from a WIP patch showing how this could look like. In this version I populated the settings with the guest restrictions too (see bug 1181970).
Blocks: 1184064
This patch is review-ready, waiting for bug 1125316 to land because I'm expecting some merge conflicts.
Bug 1180653 - Restricted Profiles: Make restrictions configurable by device admin. r?ally
Attachment #8636005 - Flags: review?(ally)
Comment on attachment 8636005 [details]
MozReview Request: Bug 1180653 - Restricted Profiles: Make restrictions configurable by device admin. r?ally

https://reviewboard.mozilla.org/r/13613/#review12813

r+ with changes below. The localizer tools are somewhat fragile, so make sure it is formatted correctly.  Feel free to ping me or Martyn if you have questions about leaving a comment for the localizers.

::: mobile/android/base/locales/en-US/android_strings.dtd:686
(Diff revision 1)
> +<!-- Restrictions -->

I think a localization comment is in order here to explain that these are shown to the device admin(adult) not the user of the browser/the restricted user (child).

::: mobile/android/base/RestrictionProvider.java:24
(Diff revision 1)
> +public class RestrictionProvider extends BroadcastReceiver {

This class looks reasonable & fine, but the finer points might be over my head. How confident are you in this portion?

::: mobile/android/base/RestrictionProvider.java:41
(Diff revision 1)
> +                extras.putParcelableArrayList(Intent.EXTRA_RESTRICTIONS_LIST, entries);

why do we need the exotic putParcelableArrayList() here?
Attachment #8636005 - Flags: review?(ally) → review+
(In reply to Allison Naaktgeboren please NEEDINFO? :ally from comment #5)
> I think a localization comment is in order here to explain that these are
> shown to the device admin(adult) not the user of the browser/the restricted
> user (child).

I added a localization comment to explain what these strings are used for and where they show up.


(In reply to Allison Naaktgeboren please NEEDINFO? :ally from comment #5)
> This class looks reasonable & fine, but the finer points might be over my
> head. How confident are you in this portion?

Very confident. I followed the spec[1] and the implementation resembles mostly the sample code shown in the DevBytes episode about Restricted profiles[2].

[1]: https://developer.android.com/about/versions/android-4.3.html#RestrictedProfiles
[2]: https://youtu.be/pdUcANNm72o?t=1m39s


(In reply to Allison Naaktgeboren please NEEDINFO? :ally from comment #5)
> ::: mobile/android/base/RestrictionProvider.java:41
> (Diff revision 1)
> > +                extras.putParcelableArrayList(Intent.EXTRA_RESTRICTIONS_LIST, entries);
> 
> why do we need the exotic putParcelableArrayList() here?

I'm following the sample here. The only way to put a non-primitive (here: RestrictionEntry) into a Bundle is to implement the Parcelable interface. 'Parceables' can be written to and read from Parcel objects that are optimized to be passed between processes (IPC).
url:        https://hg.mozilla.org/integration/fx-team/rev/c5e15548e6c801d7e7850141cf01bb72fd7060bd
changeset:  c5e15548e6c801d7e7850141cf01bb72fd7060bd
user:       Sebastian Kaspari <s.kaspari@gmail.com>
date:       Thu Jul 09 19:38:19 2015 +0200
description:
Bug 1180653 - Restricted Profiles: Make restrictions configurable by device admin. r=ally
https://hg.mozilla.org/mozilla-central/rev/c5e15548e6c8
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Blocks: 1189414

Comment 9

4 years ago
Verified as fixed on latest Aurora
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.