Disallows setting when user restriction applies
- Fix b/10116533 Change-Id: Ib171f9545c1651fb36c408decefa47b3d82ba3ab
This commit is contained in:
@@ -110,7 +110,7 @@ public class LocationMode extends LocationSettingsBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onModeChanged(int mode) {
|
||||
public void onModeChanged(int mode, boolean restricted) {
|
||||
switch (mode) {
|
||||
case Settings.Secure.LOCATION_MODE_OFF:
|
||||
Intent intent = new Intent();
|
||||
@@ -129,7 +129,8 @@ public class LocationMode extends LocationSettingsBase
|
||||
default:
|
||||
break;
|
||||
}
|
||||
boolean enabled = (mode != Settings.Secure.LOCATION_MODE_OFF);
|
||||
|
||||
boolean enabled = (mode != Settings.Secure.LOCATION_MODE_OFF) && !restricted;
|
||||
mHighAccuracy.setEnabled(enabled);
|
||||
mBatterySaving.setEnabled(enabled);
|
||||
mSensorsOnly.setEnabled(enabled);
|
||||
|
Reference in New Issue
Block a user