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

Commit 5cda3aef authored by yuemingw's avatar yuemingw
Browse files

Add DISALLOW_CONFIG_SCREEN_TIMEOUT.

Bug: 67675734
Test: cts test will be added in b/67675743.

Change-Id: I75df384acdfe4cb9c259f68ff78214c4fad6410c
parent a1781449
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -32462,6 +32462,7 @@ package android.os {
    field public static final java.lang.String DISALLOW_CONFIG_LOCALE = "no_config_locale";
    field public static final java.lang.String DISALLOW_CONFIG_LOCATION_MODE = "no_config_location_mode";
    field public static final java.lang.String DISALLOW_CONFIG_MOBILE_NETWORKS = "no_config_mobile_networks";
    field public static final java.lang.String DISALLOW_CONFIG_SCREEN_TIMEOUT = "no_config_screen_timeout";
    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";
    field public static final java.lang.String DISALLOW_CONFIG_WIFI = "no_config_wifi";
+14 −0
Original line number Diff line number Diff line
@@ -237,6 +237,20 @@ public class UserManager {
     */
    public static final String DISALLOW_AMBIENT_DISPLAY = "no_ambient_display";

    /**
     * Specifies if a user is disallowed from changing screen off timeout.
     *
     * <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_SCREEN_TIMEOUT = "no_config_screen_timeout";

    /**
     * Specifies if a user is disallowed from enabling the
     * "Unknown Sources" setting, that allows installation of apps from unknown sources.
+2 −1
Original line number Diff line number Diff line
@@ -119,7 +119,8 @@ public class UserRestrictionsUtils {
            UserManager.DISALLOW_AIRPLANE_MODE,
            UserManager.DISALLOW_CONFIG_BRIGHTNESS,
            UserManager.DISALLOW_SHARE_INTO_MANAGED_PROFILE,
            UserManager.DISALLOW_AMBIENT_DISPLAY
            UserManager.DISALLOW_AMBIENT_DISPLAY,
            UserManager.DISALLOW_CONFIG_SCREEN_TIMEOUT
    });

    /**