diff options
| author | yuemingw <yuemingw@google.com> | 2017-11-28 17:20:01 +0000 |
|---|---|---|
| committer | Yueming Wang <yuemingw@google.com> | 2017-12-21 21:48:15 +0000 |
| commit | 7cc2c4c2ee8543e0a04dc1378db2be7224535d22 (patch) | |
| tree | c726a114748a99fb0d7311809c85ac632e51c525 /core/java/android/os/UserManager.java | |
| parent | fd88d435631552659bbe87dc86620c1e5bd195ab (diff) | |
Add DISALLOW_CONFIG_LOCATION_MODE.
Bug: 67674888
Test: cts test will be added in b/67674901
Design doc: https://docs.google.com/document/d/1rvEg5jE3lMhjH-OA0iTLBUY2opM96fg7BrP81MoPnmg/edit#
Change-Id: I284d421eedfb238084fa61e7661638c22b28734f
Diffstat (limited to 'core/java/android/os/UserManager.java')
| -rw-r--r-- | core/java/android/os/UserManager.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index 75cbd57fe178..9306973210fa 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -335,6 +335,28 @@ public class UserManager { public static final String DISALLOW_CONFIG_VPN = "no_config_vpn"; /** + * Specifies if a user is disallowed from configuring location mode. Device owner and profile + * owners can set this restriction and it only applies on the managed user. + * + * <p>In a managed profile, location sharing is forced off when it's off on primary user, so + * user can still turn off location sharing on managed profile when the restriction is set by + * profile owner on managed profile. + * + * <p>This user restriction is different from {@link #DISALLOW_SHARE_LOCATION}, + * as the device owner or profile owner can still enable or disable location mode via + * {@link DevicePolicyManager#setSecureSetting} when this restriction is on. + * + * <p>The default value is <code>false</code>. + * + * <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_LOCATION_MODE = "no_config_location_mode"; + + /** * 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, |
