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

Commit 6b16ca35 authored by Rick C's avatar Rick C
Browse files

Lockscreen weather: option to invert low/high temp display (1/2)

Change-Id: Ie693e3ab0b52d3034b516635c45dba4730b61160
parent 6cb23345
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2441,6 +2441,12 @@ public final class Settings {
         */
        public static final String WEATHER_USE_METRIC = "weather_use_metric";

        /**
         * Invert low/high temperature display
         * @hide
         */
        public static final String WEATHER_INVERT_LOWHIGH = "weather_invert_lowhigh";

        /**
         * Settings to backup. This is here so that it's in the same place as the settings
         * keys and easy to update.
+3 −1
Original line number Diff line number Diff line
@@ -373,6 +373,8 @@ class KeyguardStatusViewManager implements OnClickListener {
                Settings.System.WEATHER_SHOW_LOCATION, 1) == 1;
        boolean showTimestamp = Settings.System.getInt(resolver,
                Settings.System.WEATHER_SHOW_TIMESTAMP, 1) == 1;
        boolean invertLowhigh = Settings.System.getInt(resolver,
                Settings.System.WEATHER_INVERT_LOWHIGH, 0) == 1;

        if (mWeatherPanel != null) {
            if (mWeatherCity != null) {
@@ -393,7 +395,7 @@ class KeyguardStatusViewManager implements OnClickListener {
                mWeatherTemp.setText(w.temp);
            }
            if (mWeatherLowHigh != null) {
                mWeatherLowHigh.setText(w.low + " | " + w.high);
                mWeatherLowHigh.setText(invertLowhigh ? w.high + " | " + w.low : w.low + " | " + w.high);
            }

            if (mWeatherImage != null) {