Add DISALLOW_AMBIENT_DISPLAY.

Bug: 67675787
Test: cts will be added in b/67675794

Change-Id: Ic859783e05e54ea88d98db517891d41353ad033d
This commit is contained in:
yuemingw
2018-01-10 18:59:43 +00:00
parent 1f31d9a8dd
commit a178144906
3 changed files with 16 additions and 0 deletions

View File

@@ -32449,6 +32449,7 @@ package android.os {
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_AIRPLANE_MODE = "no_airplane_mode";
field public static final java.lang.String DISALLOW_AMBIENT_DISPLAY = "no_ambient_display";
field public static final java.lang.String DISALLOW_APPS_CONTROL = "no_control_apps";
field public static final java.lang.String DISALLOW_AUTOFILL = "no_autofill";
field public static final java.lang.String DISALLOW_BLUETOOTH = "no_bluetooth";

View File

@@ -223,6 +223,20 @@ public class UserManager {
*/
public static final String DISALLOW_CONFIG_BRIGHTNESS = "no_config_brightness";
/**
* Specifies if ambient display is disallowed for the 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_AMBIENT_DISPLAY = "no_ambient_display";
/**
* Specifies if a user is disallowed from enabling the
* "Unknown Sources" setting, that allows installation of apps from unknown sources.

View File

@@ -119,6 +119,7 @@ public class UserRestrictionsUtils {
UserManager.DISALLOW_AIRPLANE_MODE,
UserManager.DISALLOW_CONFIG_BRIGHTNESS,
UserManager.DISALLOW_SHARE_INTO_MANAGED_PROFILE,
UserManager.DISALLOW_AMBIENT_DISPLAY
});
/**