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

Commit 485f3046 authored by Shan Huang's avatar Shan Huang
Browse files

Fix HUN becoming transparent as soon as it starts animating away.

Bug: 417290743
Fixes: 417290743
Test: Send HUN from notify and check transparency throughout transition
(and try open shade at various points).
Flag: com.android.systemui.notification_row_transparency

Change-Id: I6c9b538a1014c031753b7b17d2cf831807b89e4e
parent 7529413b
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -1366,12 +1366,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
            setUserExpanded(true);
        }

        // With row transparency, when the shade is expanded while a HUN is pinned,
        // that HUN will become unpinned, so it must update its bg (opaque --> transparent)
        if (notificationRowTransparency() && !isPinned()) {
            updateBackgroundColors();
        if (notificationRowTransparency()) {
            updateBackgroundTint();
        }

        setChronometerRunning(mLastChronometerRunning);
        if (isAboveShelf() != wasAboveShelf) {
            mAboveShelfChangedListener.onAboveShelfStateChanged(!wasAboveShelf);
@@ -1938,6 +1935,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        if (isAboveShelf() != wasAboveShelf) {
            mAboveShelfChangedListener.onAboveShelfStateChanged(!wasAboveShelf);
        }
        if (notificationRowTransparency()) {
            updateBackgroundTint();
        }
    }

    public void setHeadsUpAnimatingAwayListener(Consumer<Boolean> listener) {
@@ -4809,6 +4809,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        // Row background should be opaque when it's displayed as a heads-up notification or
        // displayed on keyguard.
        // Also, for an unpinned HUN on the unlocked shade, the row bg should be transparent.
        return (super.usesTransparentBackground() && !isPinned() && !mOnKeyguard);
        return super.usesTransparentBackground()
                && !mustStayOnScreen()
                && !mHeadsupDisappearRunning
                && !mOnKeyguard;
    }
}