Update Settings app to manipulate now-global settings properly
Change-Id: I6c269051c7d2db87f70f44df74e06456588c3b6f
This commit is contained in:
@@ -129,7 +129,7 @@ public class LocationSettings extends SettingsPreferenceFragment
|
||||
mAssistedGps.setEnabled(enabled);
|
||||
}
|
||||
} else if (preference == mAssistedGps) {
|
||||
Settings.Secure.putInt(cr, Settings.Secure.ASSISTED_GPS_ENABLED,
|
||||
Settings.Global.putInt(cr, Settings.Global.ASSISTED_GPS_ENABLED,
|
||||
mAssistedGps.isChecked() ? 1 : 0);
|
||||
} else {
|
||||
// If we didn't handle it, let preferences handle it.
|
||||
@@ -152,8 +152,8 @@ public class LocationSettings extends SettingsPreferenceFragment
|
||||
mNetwork.setChecked(networkEnabled);
|
||||
mLocationAccess.setChecked(gpsEnabled || networkEnabled);
|
||||
if (mAssistedGps != null) {
|
||||
mAssistedGps.setChecked(Settings.Secure.getInt(res,
|
||||
Settings.Secure.ASSISTED_GPS_ENABLED, 2) == 1);
|
||||
mAssistedGps.setChecked(Settings.Global.getInt(res,
|
||||
Settings.Global.ASSISTED_GPS_ENABLED, 2) == 1);
|
||||
mAssistedGps.setEnabled(gpsEnabled);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user