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

Commit 940503e0 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Fix notification stuck on AOD

Clear current pulse timeout and transfer ownership to
HeadsUpManagerPhone.

Test: manual
Fixes: 135086380
Change-Id: I45997ef908cda1df4aae6d528bffbedbea579ace
parent 0aa57fe0
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -149,6 +149,14 @@ public class DozeScrimController implements StateListener {
        mHandler.removeCallbacks(mPulseOut);
        mHandler.removeCallbacks(mPulseOut);
    }
    }


    /**
     * When pulsing, cancel any timeouts that would take you out of the pulsing state.
     */
    public void cancelPendingPulseTimeout() {
        mHandler.removeCallbacks(mPulseOut);
        mHandler.removeCallbacks(mPulseOutExtended);
    }

    private void cancelPulsing() {
    private void cancelPulsing() {
        if (mPulseCallback != null) {
        if (mPulseCallback != null) {
            if (DEBUG) Log.d(TAG, "Cancel pulsing");
            if (DEBUG) Log.d(TAG, "Cancel pulsing");
+4 −3
Original line number Original line Diff line number Diff line
@@ -1568,9 +1568,10 @@ public class StatusBar extends SystemUI implements DemoMode,
    @Override
    @Override
    public void onHeadsUpStateChanged(NotificationEntry entry, boolean isHeadsUp) {
    public void onHeadsUpStateChanged(NotificationEntry entry, boolean isHeadsUp) {
        mEntryManager.updateNotifications();
        mEntryManager.updateNotifications();
        if (isDozing()) {
        if (isDozing() && isHeadsUp) {
            if (isHeadsUp) {
            mDozeServiceHost.fireNotificationPulse();
            mDozeServiceHost.fireNotificationPulse();
            if (mPulsing) {
                mDozeScrimController.cancelPendingPulseTimeout();
            }
            }
        }
        }
        if (!isHeadsUp && !mHeadsUpManager.hasNotifications()) {
        if (!isHeadsUp && !mHeadsUpManager.hasNotifications()) {