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

Commit 6cf5f802 authored by John Spurlock's avatar John Spurlock Committed by Android Git Automerger
Browse files

am 85231047: Merge "PowerUI: Remove obsolete workaround." into lmp-preview-dev

* commit '85231047078a79a0ed465ce15bd7e34740d8eb73':
  PowerUI: Remove obsolete workaround.
parents d2d05f5b 8e2c4da2
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -126,25 +126,16 @@ public class PowerNotificationWarnings implements PowerUI.WarningsUI {
        updateNotification();
    }

    private void cancelOther(int showing) {
        if (mShowing != SHOWING_NOTHING && mShowing != showing) {
            mNoMan.cancel(TAG_NOTIFICATION, ID_NOTIFICATION);  // workaround no HUN on updates
        }
    }

    private void updateNotification() {
        Slog.d(TAG, "updateNotification mWarning=" + mWarning
                + " mSaver=" + mSaver + " mInvalidCharger=" + mInvalidCharger);
        if (mInvalidCharger) {
            cancelOther(SHOWING_INVALID_CHARGER);
            showInvalidChargerNotification();
            mShowing = SHOWING_INVALID_CHARGER;
        } else if (mWarning) {
            cancelOther(SHOWING_WARNING);
            showWarningNotification();
            mShowing = SHOWING_WARNING;
        } else if (mSaver) {
            cancelOther(SHOWING_SAVER);
            showSaverNotification();
            mShowing = SHOWING_SAVER;
        } else {