summaryrefslogtreecommitdiff
path: root/core/java/android/os/UserManager.java
diff options
context:
space:
mode:
authoryuemingw <yuemingw@google.com>2017-10-23 18:34:35 +0100
committeryuemingw <yuemingw@google.com>2017-10-27 10:50:49 +0100
commita9772f360202b05858fa199088bfe94697a3f623 (patch)
tree85d7c50d75544d145eeab8396ac5366de2ddff19 /core/java/android/os/UserManager.java
parentbb96e19b539be150b5cd4942488f9c5a150f109b (diff)
Add DISALLOW_CONFIG_DATE_TIME user restriction.
Test: cts test for bug 67627542 in following cl Bug: 67497909 Follow design doc: https://docs.google.com/document/d/1NV93mr2CT157S_haru1QbKo9HLeP9iPM9eMiGfVmfCM/edit# Change-Id: Iee3c2fbf88b4958dde81330c2e4d60dfce09197f
Diffstat (limited to 'core/java/android/os/UserManager.java')
-rw-r--r--core/java/android/os/UserManager.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index 8c688713c9aa..c54b72d40387 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -319,6 +319,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
* primary user. The default value is <code>false</code>.