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

Commit cc8afa6b authored by Lyn Han's avatar Lyn Han
Browse files

Fix disappearing notifications when closing fullscreen QS

We might be setting alpha to 0 for wakeup-related events at that point.
Let's not do that when shade is open. This change adds a keyguard check

Bug: 189313235
Test: manual
Change-Id: Ibc73f71d31f3b10714a9c7ce4bb9a121e497ed5b
parent f954c843
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -382,13 +382,15 @@ public class StackScrollAlgorithm {

        final boolean isHunGoingToShade = ambientState.isShadeExpanded()
                && view == ambientState.getTrackedHeadsUpRow();
        if (!isHunGoingToShade) {
            if (ambientState.isExpansionChanging() && !ambientState.isOnKeyguard()) {
        if (isHunGoingToShade) {
            // Keep 100% opacity for heads up notification going to shade.
        } else if (ambientState.isOnKeyguard()) {
            // Adjust alpha for wakeup to lockscreen.
            viewState.alpha = 1f - ambientState.getHideAmount();
        } else if (ambientState.isExpansionChanging()) {
            // Adjust alpha for shade open & close.
            viewState.alpha = Interpolators.getNotificationScrimAlpha(
                    ambientState.getExpansionFraction(), true /* notification */);
            } else {
                viewState.alpha = 1f - ambientState.getHideAmount();
            }
        }

        if (view.mustStayOnScreen() && viewState.yTranslation >= 0) {