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

Commit 5593322a authored by Yueming Wang's avatar Yueming Wang Committed by Android (Google) Code Review
Browse files

Merge "Add DISALLOW_CONFIG_DATE_TIME user restriction."

parents 65d74c77 a9772f36
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -31927,6 +31927,7 @@ package android.os {
    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";
    field public static final java.lang.String DISALLOW_CONFIG_CREDENTIALS = "no_config_credentials";
    field public static final java.lang.String DISALLOW_CONFIG_DATE_TIME = "no_config_date_time";
    field public static final java.lang.String DISALLOW_CONFIG_MOBILE_NETWORKS = "no_config_mobile_networks";
    field public static final java.lang.String DISALLOW_CONFIG_TETHERING = "no_config_tethering";
    field public static final java.lang.String DISALLOW_CONFIG_VPN = "no_config_vpn";
+1 −0
Original line number Diff line number Diff line
@@ -34776,6 +34776,7 @@ package android.os {
    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";
    field public static final java.lang.String DISALLOW_CONFIG_CREDENTIALS = "no_config_credentials";
    field public static final java.lang.String DISALLOW_CONFIG_DATE_TIME = "no_config_date_time";
    field public static final java.lang.String DISALLOW_CONFIG_MOBILE_NETWORKS = "no_config_mobile_networks";
    field public static final java.lang.String DISALLOW_CONFIG_TETHERING = "no_config_tethering";
    field public static final java.lang.String DISALLOW_CONFIG_VPN = "no_config_vpn";
+1 −0
Original line number Diff line number Diff line
@@ -32193,6 +32193,7 @@ package android.os {
    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";
    field public static final java.lang.String DISALLOW_CONFIG_CREDENTIALS = "no_config_credentials";
    field public static final java.lang.String DISALLOW_CONFIG_DATE_TIME = "no_config_date_time";
    field public static final java.lang.String DISALLOW_CONFIG_MOBILE_NETWORKS = "no_config_mobile_networks";
    field public static final java.lang.String DISALLOW_CONFIG_TETHERING = "no_config_tethering";
    field public static final java.lang.String DISALLOW_CONFIG_VPN = "no_config_vpn";
+17 −0
Original line number Diff line number Diff line
@@ -318,6 +318,23 @@ public class UserManager {
     */
    public static final String DISALLOW_CONFIG_VPN = "no_config_vpn";

    /**
     * Specifies if date, time and timezone configuring is disallowed.
     *
     * <p>When restriction is set by device owners, it applies globally - i.e., it disables date,
     * time and timezone setting on the entire device and all users will be affected. When it's set
     * by profile owners, it's only applied to the managed user.
     * <p>The default value is <code>false</code>.
     *
     * <p>This user restriction has no effect on managed profiles.
     * <p>Key for user restrictions.
     * <p>Type: Boolean
     * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
     * @see DevicePolicyManager#clearUserRestriction(ComponentName, String)
     * @see #getUserRestrictions()
     */
    public static final String DISALLOW_CONFIG_DATE_TIME = "no_config_date_time";

    /**
     * Specifies if a user is disallowed from configuring Tethering
     * & portable hotspots. This can only be set by device owners and profile owners on the
+2 −0
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ public class UserRestrictionsUtils {
            UserManager.DISALLOW_REMOVE_MANAGED_PROFILE,
            UserManager.DISALLOW_DEBUGGING_FEATURES,
            UserManager.DISALLOW_CONFIG_VPN,
            UserManager.DISALLOW_CONFIG_DATE_TIME,
            UserManager.DISALLOW_CONFIG_TETHERING,
            UserManager.DISALLOW_NETWORK_RESET,
            UserManager.DISALLOW_FACTORY_RESET,
@@ -157,6 +158,7 @@ public class UserRestrictionsUtils {
    private static final Set<String> GLOBAL_RESTRICTIONS = Sets.newArraySet(
            UserManager.DISALLOW_ADJUST_VOLUME,
            UserManager.DISALLOW_BLUETOOTH_SHARING,
            UserManager.DISALLOW_CONFIG_DATE_TIME,
            UserManager.DISALLOW_SYSTEM_ERROR_DIALOGS,
            UserManager.DISALLOW_RUN_IN_BACKGROUND,
            UserManager.DISALLOW_UNMUTE_MICROPHONE,