diff options
author | Luis Vidal <lvidal@cyngn.com> | 2016-05-10 17:16:47 -0700 |
---|---|---|
committer | Luis Vidal <lvidal@cyngn.com> | 2016-05-10 17:33:09 -0700 |
commit | d48d84a4b49339b2470a23add497337f6d04bfea (patch) | |
tree | 98cef1938bf4d56377e84a917c33ce7811d1cf86 /src/com | |
parent | 5ec7c34c2da4a0e2ef8f0f3d0f2bef98eca84089 (diff) | |
download | packages_apps_Settings-d48d84a4b49339b2470a23add497337f6d04bfea.zip packages_apps_Settings-d48d84a4b49339b2470a23add497337f6d04bfea.tar.gz packages_apps_Settings-d48d84a4b49339b2470a23add497337f6d04bfea.tar.bz2 |
Add config to hide/show weather menu
This config controls whether the weather menu
should be displayed in settings
Change-Id: I89502d22cb56496825f497e6b19fce3d8e0a7a3c
TICKET: CYNGNOS-2796
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/settings/SettingsActivity.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java index df197a5..d1aefad 100644 --- a/src/com/android/settings/SettingsActivity.java +++ b/src/com/android/settings/SettingsActivity.java @@ -1333,8 +1333,11 @@ public class SettingsActivity extends Activity removeTile = true; } } else if (id == R.id.weather_settings) { + final boolean showWeatherMenu = getResources() + .getBoolean(R.bool.config_showWeatherMenu); + if (!getPackageManager().hasSystemFeature( - CMContextConstants.Features.WEATHER_SERVICES)) { + CMContextConstants.Features.WEATHER_SERVICES) || !showWeatherMenu) { removeTile = true; } } |