OSDN Git Service

Add DISALLOW_AMBIENT_DISPLAY.
authoryuemingw <yuemingw@google.com>
Wed, 10 Jan 2018 18:59:43 +0000 (18:59 +0000)
committeryuemingw <yuemingw@google.com>
Mon, 15 Jan 2018 11:33:18 +0000 (11:33 +0000)
Bug: 67675787
Test: cts will be added in b/67675794

Change-Id: Ic859783e05e54ea88d98db517891d41353ad033d

api/current.txt
core/java/android/os/UserManager.java
services/core/java/com/android/server/pm/UserRestrictionsUtils.java

index 029d07d..f22279b 100644 (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";
index 60818d1..2197484 100644 (file)
@@ -224,6 +224,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.
      * The default value is <code>false</code>.
index 6964e9d..50690cb 100644 (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
     });
 
     /**