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

Commit 16e88f4c authored by Shan Huang's avatar Shan Huang Committed by Android (Google) Code Review
Browse files

Merge "Fix HUN becoming transparent as soon as it starts animating away." into main

parents 385a9fe0 485f3046
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -1369,12 +1369,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);
@@ -1943,6 +1940,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        if (isAboveShelf() != wasAboveShelf) {
            mAboveShelfChangedListener.onAboveShelfStateChanged(!wasAboveShelf);
        }
        if (notificationRowTransparency()) {
            updateBackgroundTint();
        }
    }

    public void setHeadsUpAnimatingAwayListener(Consumer<Boolean> listener) {
@@ -4839,6 +4839,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;
    }
}