diff options
| -rw-r--r-- | api/current.txt | 2 | ||||
| -rw-r--r-- | core/java/android/os/UserManager.java | 8 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java | 2 | ||||
| -rw-r--r-- | services/core/java/com/android/server/pm/UserRestrictionsUtils.java | 2 |
4 files changed, 8 insertions, 6 deletions
diff --git a/api/current.txt b/api/current.txt index dee0b0464f26..16e8a5154e7d 100644 --- a/api/current.txt +++ b/api/current.txt @@ -33115,7 +33115,7 @@ package android.os { field public static final java.lang.String DISALLOW_CONFIG_CREDENTIALS = "no_config_credentials"; field public static final java.lang.String DISALLOW_CONFIG_DATE_TIME = "no_config_date_time"; 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_LOCATION = "no_config_location"; 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"; diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index b2b43cfd6ddc..2093cec769da 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -393,8 +393,9 @@ 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. + * Specifies if a user is disallowed from enabling or disabling location providers. As a + * result, user is disallowed from turning on or off location. 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 @@ -408,11 +409,12 @@ public class UserManager { * * <p>Key for user restrictions. * <p>Type: Boolean + * @see android.location.LocationManager#isProviderEnabled(String) * @see DevicePolicyManager#addUserRestriction(ComponentName, String) * @see DevicePolicyManager#clearUserRestriction(ComponentName, String) * @see #getUserRestrictions() */ - public static final String DISALLOW_CONFIG_LOCATION_MODE = "no_config_location_mode"; + public static final String DISALLOW_CONFIG_LOCATION = "no_config_location"; /** * Specifies if date, time and timezone configuring is disallowed. diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java index 8bdbf28b5cf1..d7f2a2642180 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java @@ -102,7 +102,7 @@ public class LocationTile extends QSTileImpl<BooleanState> { state.value = locationEnabled; checkIfRestrictionEnforcedByAdminOnly(state, UserManager.DISALLOW_SHARE_LOCATION); if (state.disabledByPolicy == false) { - checkIfRestrictionEnforcedByAdminOnly(state, UserManager.DISALLOW_CONFIG_LOCATION_MODE); + checkIfRestrictionEnforcedByAdminOnly(state, UserManager.DISALLOW_CONFIG_LOCATION); } state.icon = mIcon; state.slash.isSlashed = !state.value; diff --git a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java index a42fcbdd94a0..842f8d0a42f5 100644 --- a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java +++ b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java @@ -117,7 +117,7 @@ public class UserRestrictionsUtils { UserManager.DISALLOW_AUTOFILL, UserManager.DISALLOW_USER_SWITCH, UserManager.DISALLOW_UNIFIED_PASSWORD, - UserManager.DISALLOW_CONFIG_LOCATION_MODE, + UserManager.DISALLOW_CONFIG_LOCATION, UserManager.DISALLOW_AIRPLANE_MODE, UserManager.DISALLOW_CONFIG_BRIGHTNESS, UserManager.DISALLOW_SHARE_INTO_MANAGED_PROFILE, |