diff options
author | Christopher Tate <ctate@google.com> | 2012-09-10 15:39:05 -0700 |
---|---|---|
committer | Christopher Tate <ctate@google.com> | 2012-09-10 15:46:17 -0700 |
commit | 6a5929b086a61a955a4a2f43f5fa251e8754ff4a (patch) | |
tree | 14f7dcf6986e314c29660d36f20b69e32ea6dc7c /src/com/android/settings/WirelessSettings.java | |
parent | 955f3477a910f56132f341f6679c9157b0cd515c (diff) | |
download | packages_apps_Settings-6a5929b086a61a955a4a2f43f5fa251e8754ff4a.tar.gz packages_apps_Settings-6a5929b086a61a955a4a2f43f5fa251e8754ff4a.tar.bz2 packages_apps_Settings-6a5929b086a61a955a4a2f43f5fa251e8754ff4a.zip |
Update Settings app to use new namespace for airplane-mode settings
Bug 7132230
Change-Id: I0253637e6d464afc229cf11ffe69852bf44fe261
Diffstat (limited to 'src/com/android/settings/WirelessSettings.java')
-rw-r--r-- | src/com/android/settings/WirelessSettings.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java index 347315a05..c2a3f19e6 100644 --- a/src/com/android/settings/WirelessSettings.java +++ b/src/com/android/settings/WirelessSettings.java @@ -85,8 +85,8 @@ public class WirelessSettings extends SettingsPreferenceFragment { return true; } // Here we use the same logic in onCreate(). - String toggleable = Settings.System.getString(context.getContentResolver(), - Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS); + String toggleable = Settings.Global.getString(context.getContentResolver(), + Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS); return toggleable != null && toggleable.contains(type); } @@ -109,8 +109,8 @@ public class WirelessSettings extends SettingsPreferenceFragment { getPreferenceScreen().removePreference(nsd); //mNsdEnabler = new NsdEnabler(activity, nsd); - String toggleable = Settings.System.getString(activity.getContentResolver(), - Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS); + String toggleable = Settings.Global.getString(activity.getContentResolver(), + Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS); //enable/disable wimax depending on the value in config.xml boolean isWimaxEnabled = this.getResources().getBoolean( @@ -120,24 +120,24 @@ public class WirelessSettings extends SettingsPreferenceFragment { Preference ps = (Preference) findPreference(KEY_WIMAX_SETTINGS); if (ps != null) root.removePreference(ps); } else { - if (toggleable == null || !toggleable.contains(Settings.System.RADIO_WIMAX ) + if (toggleable == null || !toggleable.contains(Settings.Global.RADIO_WIMAX ) && isWimaxEnabled) { Preference ps = (Preference) findPreference(KEY_WIMAX_SETTINGS); ps.setDependency(KEY_TOGGLE_AIRPLANE); } } // Manually set dependencies for Wifi when not toggleable. - if (toggleable == null || !toggleable.contains(Settings.System.RADIO_WIFI)) { + if (toggleable == null || !toggleable.contains(Settings.Global.RADIO_WIFI)) { findPreference(KEY_VPN_SETTINGS).setDependency(KEY_TOGGLE_AIRPLANE); } // Manually set dependencies for Bluetooth when not toggleable. - if (toggleable == null || !toggleable.contains(Settings.System.RADIO_BLUETOOTH)) { + if (toggleable == null || !toggleable.contains(Settings.Global.RADIO_BLUETOOTH)) { // No bluetooth-dependent items in the list. Code kept in case one is added later. } // Manually set dependencies for NFC when not toggleable. - if (toggleable == null || !toggleable.contains(Settings.System.RADIO_NFC)) { + if (toggleable == null || !toggleable.contains(Settings.Global.RADIO_NFC)) { findPreference(KEY_TOGGLE_NFC).setDependency(KEY_TOGGLE_AIRPLANE); findPreference(KEY_ANDROID_BEAM_SETTINGS).setDependency(KEY_TOGGLE_AIRPLANE); } |