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

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

Keep HUN opaque for transition to shade

Bug: 189145086
Test: swipe down from hun to go to shade => hun stays opaque
Change-Id: I5de477b86f5e6a776c91d6039e78d406c8d896a4
parent 79e39e8e
Loading
Loading
Loading
Loading
+9 −5
Original line number Original line Diff line number Diff line
@@ -380,12 +380,16 @@ public class StackScrollAlgorithm {
        ExpandableViewState viewState = view.getViewState();
        ExpandableViewState viewState = view.getViewState();
        viewState.location = ExpandableViewState.LOCATION_UNKNOWN;
        viewState.location = ExpandableViewState.LOCATION_UNKNOWN;


        final boolean isHunGoingToShade = ambientState.isShadeExpanded()
                && view == ambientState.getTrackedHeadsUpRow();
        if (!isHunGoingToShade) {
            if (ambientState.isExpansionChanging() && !ambientState.isOnKeyguard()) {
            if (ambientState.isExpansionChanging() && !ambientState.isOnKeyguard()) {
                viewState.alpha = Interpolators.getNotificationScrimAlpha(
                viewState.alpha = Interpolators.getNotificationScrimAlpha(
                        ambientState.getExpansionFraction(), true /* notification */);
                        ambientState.getExpansionFraction(), true /* notification */);
            } else {
            } else {
                viewState.alpha = 1f - ambientState.getHideAmount();
                viewState.alpha = 1f - ambientState.getHideAmount();
            }
            }
        }


        if (view.mustStayOnScreen() && viewState.yTranslation >= 0) {
        if (view.mustStayOnScreen() && viewState.yTranslation >= 0) {
            // Even if we're not scrolled away we're in view and we're also not in the
            // Even if we're not scrolled away we're in view and we're also not in the