Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6ca8b0c authored by Yueming Wang's avatar Yueming Wang Committed by Android (Google) Code Review
Browse files

Merge "Rename DISALLOW_CONFIG_LOCATION_MODE to DISALLOW_CONFIG_LOCATION."

parents 38674ece 7810b8b5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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";
+5 −3
Original line number Diff line number Diff line
@@ -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.
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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,