Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ca80fe4 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Single-user restrictions

New restrictions panel for restricting list of available apps for the user.
Apps that support restrictions can also be configured here.
Restrictions screen is PIN protected and will ask you to create a PIN the
first time you use it.

Change-Id: I7a5267df4272521ad80e6a8b6a18932d07179eb8
parent c911bbe2
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4468,6 +4468,15 @@
    <!-- Warning message title for global font change [CHAR LIMIT=40] -->
    <string name="global_font_change_title">Change font size</string>

    <!-- Restrictions settings --><skip/>

    <!-- Restriction settings title [CHAR LIMIT=35] -->
    <string name="restriction_settings_title">Restrictions</string>
    <!-- Restrictions screen - reset menu to reset to unrestricted [CHAR LIMIT=25] -->
    <string name="restriction_menu_reset">Remove restrictions</string>
    <!-- Restrictions screen - menu label to change restrictions pin [CHAR LIMIT=25] -->
    <string name="restriction_menu_change_pin">Change PIN</string>

    <!-- Label for are-notifications-enabled checkbox in app details [CHAR LIMIT=20] -->
    <string name="app_notifications_switch_label">Show notifications</string>

+7 −0
Original line number Diff line number Diff line
@@ -97,6 +97,13 @@
        android:title="@string/applications_settings"
        android:id="@+id/application_settings" />

    <!-- Manage restrictions -->
    <header
        android:fragment="com.android.settings.users.RestrictionSettings"
        android:icon="@drawable/ic_settings_multiuser"
        android:title="@string/restriction_settings_title"
        android:id="@+id/restriction_settings" />

    <!-- Manage users -->
    <header
        android:fragment="com.android.settings.users.UserSettings"
+5 −0
Original line number Diff line number Diff line
@@ -116,6 +116,7 @@ public class Settings extends PreferenceActivity
            R.id.location_settings,
            R.id.security_settings,
            R.id.language_settings,
            R.id.restriction_settings,
            R.id.user_settings,
            R.id.account_settings,
            R.id.account_add,
@@ -486,6 +487,10 @@ public class Settings extends PreferenceActivity
                if (um.hasUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS)) {
                    target.remove(i);
                }
            } else if (id == R.id.restriction_settings) {
                if (um.isLinkedUser()) {
                    target.remove(i);
                }
            }

            if (i < target.size() && target.get(i) == header
Loading