Update Settings app to manipulate now-global settings properly

Change-Id: I6c269051c7d2db87f70f44df74e06456588c3b6f
This commit is contained in:
Christopher Tate
2012-09-07 13:35:31 -07:00
parent 96c2f8c508
commit 5a64c739bf
5 changed files with 30 additions and 30 deletions

View File

@@ -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);
}
}