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

Commit 86e80290 authored by Emily Bernier's avatar Emily Bernier Committed by Android (Google) Code Review
Browse files

Merge "New user restrictions for EDU"

parents 7486ae20 394a6cdd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -20546,6 +20546,7 @@ package android.os {
    method public void setUserRestrictions(android.os.Bundle);
    method public void setUserRestrictions(android.os.Bundle, android.os.UserHandle);
    field public static final java.lang.String DISALLOW_ADD_USER = "no_add_user";
    field public static final java.lang.String DISALLOW_ADJUST_VOLUME = "no_adjust_volume";
    field public static final java.lang.String DISALLOW_CONFIG_APPS = "no_config_apps";
    field public static final java.lang.String DISALLOW_CONFIG_BLUETOOTH = "no_config_bluetooth";
    field public static final java.lang.String DISALLOW_CONFIG_CELL_BROADCASTS = "no_config_cell_broadcasts";
@@ -20559,9 +20560,11 @@ package android.os {
    field public static final java.lang.String DISALLOW_INSTALL_APPS = "no_install_apps";
    field public static final java.lang.String DISALLOW_INSTALL_UNKNOWN_SOURCES = "no_install_unknown_sources";
    field public static final java.lang.String DISALLOW_MODIFY_ACCOUNTS = "no_modify_accounts";
    field public static final java.lang.String DISALLOW_MOUNT_PHYSICAL_MEDIA = "no_physical_media";
    field public static final java.lang.String DISALLOW_REMOVE_USER = "no_remove_user";
    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_UNMUTE_MICROPHONE = "no_unmute_microphone";
    field public static final java.lang.String DISALLOW_USB_FILE_TRANSFER = "no_usb_file_transfer";
    field public static final java.lang.String ENSURE_VERIFY_APPS = "ensure_verify_apps";
  }
+33 −1
Original line number Diff line number Diff line
@@ -234,6 +234,38 @@ public class UserManager {
     */
    public static final String DISALLOW_CONFIG_APPS = "no_config_apps";

    /**
     * Key for user restrictions. Specifies if a user is disallowed from mounting
     * physical external media. The default value is <code>false</code>.
     * <p/>
     * Type: Boolean
     * @see #setUserRestrictions(Bundle)
     * @see #getUserRestrictions()
     */
    public static final String DISALLOW_MOUNT_PHYSICAL_MEDIA = "no_physical_media";

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

    /**
     * Key for user restrictions. Specifies if a user is disallowed from adjusting the master
     * volume.
     * The default value is <code>false</code>.
     * <p/>
     * Type: Boolean
     * @see #setUserRestrictions(Bundle)
     * @see #getUserRestrictions()
     */
    public static final String DISALLOW_ADJUST_VOLUME = "no_adjust_volume";

    /** @hide */
    public static final int PIN_VERIFICATION_FAILED_INCORRECT = -3;
    /** @hide */
+7 −0
Original line number Diff line number Diff line
@@ -743,6 +743,9 @@ public class UserManagerService extends IUserManager.Stub {
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_CONFIG_CELL_BROADCASTS);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_CONFIG_APPS);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_MOUNT_PHYSICAL_MEDIA);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_UNMUTE_MICROPHONE);
                writeBoolean(serializer, restrictions, UserManager.DISALLOW_ADJUST_VOLUME);
                serializer.endTag(null, TAG_RESTRICTIONS);
            }
            serializer.endTag(null, TAG_USER);
@@ -891,6 +894,10 @@ public class UserManagerService extends IUserManager.Stub {
                        readBoolean(parser, restrictions, UserManager.DISALLOW_CONFIG_CELL_BROADCASTS);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_CONFIG_APPS);
                        readBoolean(parser, restrictions,
                                UserManager.DISALLOW_MOUNT_PHYSICAL_MEDIA);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_UNMUTE_MICROPHONE);
                        readBoolean(parser, restrictions, UserManager.DISALLOW_ADJUST_VOLUME);
                    }
                }
            }