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

Commit fed233ef authored by Andrew Sapperstein's avatar Andrew Sapperstein Committed by android-build-merger
Browse files

Decrease frequency of high temp warnings am: 97bfa0f1

am: be0f185d

Change-Id: I8922139364c0b03927141236325b3ce667280dc6
parents 717ca4b0 be0f185d
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -217,8 +217,16 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
            return;
        }
        mTempWarning = false;
        mNoMan.cancelAsUser(TAG_TEMPERATURE, SystemMessage.NOTE_HIGH_TEMP,
                UserHandle.ALL);
        dismissTemperatureWarningInternal();
    }

    /**
     * Internal only version of {@link #dismissTemperatureWarning()} that simply dismisses
     * the notification. As such, the notification will not show again until
     * {@link #dismissTemperatureWarning()} is called.
     */
    private void dismissTemperatureWarningInternal() {
        mNoMan.cancelAsUser(TAG_TEMPERATURE, SystemMessage.NOTE_HIGH_TEMP, UserHandle.ALL);
    }

    @Override
@@ -390,10 +398,10 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
            } else if (action.equals(ACTION_DISMISSED_WARNING)) {
                dismissLowBatteryWarning();
            } else if (ACTION_CLICKED_TEMP_WARNING.equals(action)) {
                dismissTemperatureWarning();
                dismissTemperatureWarningInternal();
                showTemperatureDialog();
            } else if (ACTION_DISMISSED_TEMP_WARNING.equals(action)) {
                dismissTemperatureWarning();
                dismissTemperatureWarningInternal();
            }
        }
    }