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

Commit d46d0f9d authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Add new EDU user restrictions.

Change-Id: I6aad10466d99cda6be378c72025df686fe665071
parent 2c5d4a08
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -20516,6 +20516,15 @@ package android.os {
    field public static final java.lang.String DISALLOW_SHARE_LOCATION = "no_share_location";
    field public static final java.lang.String DISALLOW_UNINSTALL_APPS = "no_uninstall_apps";
    field public static final java.lang.String DISALLOW_USB_FILE_TRANSFER = "no_usb_file_transfer";
    field public static final java.lang.String DISALLOW_DEBUGGING_FEATURES = "no_debugging_features";
    field public static final java.lang.String DISALLOW_CONFIG_VPN = "no_config_vpn";
    field public static final java.lang.String DISALLOW_CONFIG_TETHERING = "no_config_tethering";
    field public static final java.lang.String DISALLOW_FACTORY_RESET = "no_factory_reset";
    field public static final java.lang.String DISALLOW_ADD_USER = "no_add_user";
    field public static final java.lang.String ENSURE_VERIFY_APPS = "ensure_verify_apps";
    field public static final java.lang.String DISALLOW_CONFIG_CELL_BROADCASTS = "no_config_cell_broadcasts";
    field public static final java.lang.String DISALLOW_CONFIG_MOBILE_NETWORKS = "no_config_mobile_networks";
    field public static final java.lang.String DISALLOW_CONFIG_APPS = "no_config_apps";
  }
  public abstract class Vibrator {
+90 −1
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@ public class UserManager {
     * @see #setUserRestrictions(Bundle)
     * @see #getUserRestrictions()
     */

    public static final String DISALLOW_SHARE_LOCATION = "no_share_location";

    /**
@@ -145,6 +144,96 @@ public class UserManager {
     */
    public static final String DISALLOW_REMOVE_USER = "no_remove_user";

    /**
     * Key for user restrictions. Specifies if a user is disallowed from enabling or
     * accessing debugging features. The default value is <code>false</code>.
     * <p/>
     * Type: Boolean
     * @see #setUserRestrictions(Bundle)
     * @see #getUserRestrictions()
     */
    public static final String DISALLOW_DEBUGGING_FEATURES = "no_debugging_features";

    /**
     * Key for user restrictions. Specifies if a user is disallowed from configuring VPN.
     * The default value is <code>false</code>.
     * <p/>
     * Type: Boolean
     * @see #setUserRestrictions(Bundle)
     * @see #getUserRestrictions()
     */
    public static final String DISALLOW_CONFIG_VPN = "no_config_vpn";

    /**
     * Key for user restrictions. Specifies if a user is disallowed from configuring Tethering
     * & portable hotspots. The default value is <code>false</code>.
     * <p/>
     * Type: Boolean
     * @see #setUserRestrictions(Bundle)
     * @see #getUserRestrictions()
     */
    public static final String DISALLOW_CONFIG_TETHERING = "no_config_tethering";

    /**
     * Key for user restrictions. Specifies if a user is disallowed from factory resetting
     * from Settings.
     * The default value is <code>false</code>.
     * <p>
     * @see #setUserRestrictions(Bundle)
     * @see #getUserRestrictions()
     */
    public static final String DISALLOW_FACTORY_RESET = "no_factory_reset";

    /**
     * Key for user restrictions. Specifies if a user is disallowed from adding new users and
     * profiles. The default value is <code>false</code>.
     * <p>
     * Type: Boolean
     * @see #setUserRestrictions(Bundle)
     * @see #getUserRestrictions()
     */
    public static final String DISALLOW_ADD_USER = "no_add_user";

    /**
     * Key for user restrictions. Specifies if a user is disallowed from disabling application
     * verification. The default value is <code>false</code>.
     * <p>
     * Type: Boolean
     * @see #setUserRestrictions(Bundle)
     * @see #getUserRestrictions()
     */
    public static final String ENSURE_VERIFY_APPS = "ensure_verify_apps";

    /**
     * Key for user restrictions. Specifies if a user is disallowed from configuring cell
     * broadcasts. The default value is <code>false</code>.
     * <p>
     * Type: Boolean
     * @see #setUserRestrictions(Bundle)
     * @see #getUserRestrictions()
     */
    public static final String DISALLOW_CONFIG_CELL_BROADCASTS = "no_config_cell_broadcasts";

    /**
     * Key for user restrictions. Specifies if a user is disallowed from configuring mobile
     * networks. The default value is <code>false</code>.
     * <p>
     * Type: Boolean
     * @see #setUserRestrictions(Bundle)
     * @see #getUserRestrictions()
     */
    public static final String DISALLOW_CONFIG_MOBILE_NETWORKS = "no_config_mobile_networks";

    /**
     * Key for user restrictions. Specifies if a user is disallowed from configuring
     * applications in Settings. The default value is <code>false</code>.
     * <p>
     * Type: Boolean
     * @see #setUserRestrictions(Bundle)
     * @see #getUserRestrictions()
     */
    public static final String DISALLOW_CONFIG_APPS = "no_config_apps";

    /** @hide */
    public static final int PIN_VERIFICATION_FAILED_INCORRECT = -3;
    /** @hide */
+18 −0
Original line number Diff line number Diff line
@@ -734,6 +734,15 @@ public class UserManagerService extends IUserManager.Stub {
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_USB_FILE_TRANSFER);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_CONFIG_CREDENTIALS);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_REMOVE_USER);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_DEBUGGING_FEATURES);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_CONFIG_VPN);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_CONFIG_TETHERING);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_FACTORY_RESET);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_ADD_USER);
                writeBoolean(serializer, restrictions, UserManager.ENSURE_VERIFY_APPS);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_CONFIG_CELL_BROADCASTS);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_CONFIG_APPS);
                serializer.endTag(null, TAG_RESTRICTIONS);
            }
            serializer.endTag(null, TAG_USER);
@@ -873,6 +882,15 @@ public class UserManagerService extends IUserManager.Stub {
                        readBoolean(parser, restrictions, UserManager.DISALLOW_USB_FILE_TRANSFER);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_CONFIG_CREDENTIALS);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_REMOVE_USER);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_DEBUGGING_FEATURES);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_CONFIG_VPN);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_CONFIG_TETHERING);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_FACTORY_RESET);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_ADD_USER);
                        readBoolean(parser, restrictions, UserManager.ENSURE_VERIFY_APPS);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_CONFIG_CELL_BROADCASTS);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_CONFIG_APPS);
                    }
                }
            }