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

Commit 0bd2f266 authored by John Spurlock's avatar John Spurlock
Browse files

PowerUI: Remove obsolete workaround.

No longer need to cancel and repost notifications when
transitioning from/to heads-up.

Bug:15534198
Change-Id: I93e5433e51410c80c2e183976e0041ca1bfeb3c7
parent 4a1ca967
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 {