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

@@ -117,7 +117,7 @@ public class WifiApEnabler {
if (enable && ((wifiState == WifiManager.WIFI_STATE_ENABLING) ||
(wifiState == WifiManager.WIFI_STATE_ENABLED))) {
mWifiManager.setWifiEnabled(false);
Settings.Secure.putInt(cr, Settings.Secure.WIFI_SAVED_STATE, 1);
Settings.Global.putInt(cr, Settings.Global.WIFI_SAVED_STATE, 1);
}
if (mWifiManager.setWifiApEnabled(null, enable)) {
@@ -133,13 +133,13 @@ public class WifiApEnabler {
if (!enable) {
int wifiSavedState = 0;
try {
wifiSavedState = Settings.Secure.getInt(cr, Settings.Secure.WIFI_SAVED_STATE);
wifiSavedState = Settings.Global.getInt(cr, Settings.Global.WIFI_SAVED_STATE);
} catch (Settings.SettingNotFoundException e) {
;
}
if (wifiSavedState == 1) {
mWifiManager.setWifiEnabled(true);
Settings.Secure.putInt(cr, Settings.Secure.WIFI_SAVED_STATE, 0);
Settings.Global.putInt(cr, Settings.Global.WIFI_SAVED_STATE, 0);
}
}
}