am cb122bd1
: Merge "Wifi settings are in a different namespace now" into jb-mr1-dev
* commit 'cb122bd15a1b406e99e3760f01350367857f8f55': Wifi settings are in a different namespace now
This commit is contained in:
@@ -113,9 +113,9 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment
|
|||||||
sleepPolicyPref.setEntries(R.array.wifi_sleep_policy_entries_wifi_only);
|
sleepPolicyPref.setEntries(R.array.wifi_sleep_policy_entries_wifi_only);
|
||||||
}
|
}
|
||||||
sleepPolicyPref.setOnPreferenceChangeListener(this);
|
sleepPolicyPref.setOnPreferenceChangeListener(this);
|
||||||
int value = Settings.System.getInt(getContentResolver(),
|
int value = Settings.Global.getInt(getContentResolver(),
|
||||||
Settings.System.WIFI_SLEEP_POLICY,
|
Settings.Global.WIFI_SLEEP_POLICY,
|
||||||
Settings.System.WIFI_SLEEP_POLICY_NEVER);
|
Settings.Global.WIFI_SLEEP_POLICY_NEVER);
|
||||||
String stringValue = String.valueOf(value);
|
String stringValue = String.valueOf(value);
|
||||||
sleepPolicyPref.setValue(stringValue);
|
sleepPolicyPref.setValue(stringValue);
|
||||||
updateSleepPolicySummary(sleepPolicyPref, stringValue);
|
updateSleepPolicySummary(sleepPolicyPref, stringValue);
|
||||||
@@ -181,7 +181,7 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment
|
|||||||
if (KEY_SLEEP_POLICY.equals(key)) {
|
if (KEY_SLEEP_POLICY.equals(key)) {
|
||||||
try {
|
try {
|
||||||
String stringValue = (String) newValue;
|
String stringValue = (String) newValue;
|
||||||
Settings.System.putInt(getContentResolver(), Settings.System.WIFI_SLEEP_POLICY,
|
Settings.Global.putInt(getContentResolver(), Settings.Global.WIFI_SLEEP_POLICY,
|
||||||
Integer.parseInt(stringValue));
|
Integer.parseInt(stringValue));
|
||||||
updateSleepPolicySummary(preference, stringValue);
|
updateSleepPolicySummary(preference, stringValue);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
|
Reference in New Issue
Block a user