diff options
author | Danesh M <daneshm90@gmail.com> | 2016-01-26 14:54:27 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-01-26 14:58:18 -0800 |
commit | ed3b78339329a5816335eaeb33ddf42933593c99 (patch) | |
tree | cdb7809f620bb8214df9ba9c231f49530ea59277 /src/com/android/settings/wifi/AdvancedWifiSettings.java | |
parent | 41a3a31e1727de4a3810099d5ef97bd7abc54633 (diff) | |
download | packages_apps_Settings-ed3b78339329a5816335eaeb33ddf42933593c99.tar.gz packages_apps_Settings-ed3b78339329a5816335eaeb33ddf42933593c99.tar.bz2 packages_apps_Settings-ed3b78339329a5816335eaeb33ddf42933593c99.zip |
Settings : Add overlay for hiding wifi region code
CYNGNOS-1637
Change-Id: Ieb1f6553a2addb17ec6b93b51ab8fb19f6c5ca49
Diffstat (limited to 'src/com/android/settings/wifi/AdvancedWifiSettings.java')
-rw-r--r-- | src/com/android/settings/wifi/AdvancedWifiSettings.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/com/android/settings/wifi/AdvancedWifiSettings.java b/src/com/android/settings/wifi/AdvancedWifiSettings.java index ad4a9e151..f764dd4c3 100644 --- a/src/com/android/settings/wifi/AdvancedWifiSettings.java +++ b/src/com/android/settings/wifi/AdvancedWifiSettings.java @@ -202,12 +202,18 @@ public class AdvancedWifiSettings extends SettingsPreferenceFragment ListPreference ccodePref = (ListPreference) findPreference(KEY_COUNTRY_CODE); if (ccodePref != null) { - ccodePref.setOnPreferenceChangeListener(this); - String value = mWifiManager.getCountryCode(); - if (value != null) { - ccodePref.setValue(value); + boolean hideWifiRegion = getResources() + .getBoolean(R.bool.config_hide_wifi_region_code); + if (hideWifiRegion) { + removePreference(KEY_COUNTRY_CODE); } else { - Log.e(TAG, "Failed to fetch country code"); + ccodePref.setOnPreferenceChangeListener(this); + String value = mWifiManager.getCountryCode(); + if (value != null) { + ccodePref.setValue(value); + } else { + Log.e(TAG, "Failed to fetch country code"); + } } } |