Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d48d84a4 authored by Luis Vidal's avatar Luis Vidal
Browse files

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
parent 5ec7c34c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -120,4 +120,6 @@
    <!-- When true Live lock screen settings will be positioned at the top -->
    <bool name="config_showLiveLockScreenSettingsFirst">false</bool>

    <!-- When true, weather options will be displayed in settings dashboard -->
    <bool name="config_showWeatherMenu">true</bool>
</resources>
+4 −1
Original line number Diff line number Diff line
@@ -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;
                    }
                }