From a5ebc89c52ed10f6043effec95f089181cf8cf46 Mon Sep 17 00:00:00 2001 From: Lyn Han Date: Wed, 26 May 2021 12:47:02 -0500 Subject: [PATCH] Keep HUN opaque for transition to shade Bug: 189145086 Test: swipe down from hun to go to shade => hun stays opaque Change-Id: I5de477b86f5e6a776c91d6039e78d406c8d896a4 --- .../notification/stack/StackScrollAlgorithm.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java index d9cbfda8b3c83..aab175bc64db2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java @@ -380,11 +380,15 @@ public class StackScrollAlgorithm { ExpandableViewState viewState = view.getViewState(); viewState.location = ExpandableViewState.LOCATION_UNKNOWN; - if (ambientState.isExpansionChanging() && !ambientState.isOnKeyguard()) { - viewState.alpha = Interpolators.getNotificationScrimAlpha( - ambientState.getExpansionFraction(), true /* notification */); - } else { - viewState.alpha = 1f - ambientState.getHideAmount(); + final boolean isHunGoingToShade = ambientState.isShadeExpanded() + && view == ambientState.getTrackedHeadsUpRow(); + if (!isHunGoingToShade) { + if (ambientState.isExpansionChanging() && !ambientState.isOnKeyguard()) { + viewState.alpha = Interpolators.getNotificationScrimAlpha( + ambientState.getExpansionFraction(), true /* notification */); + } else { + viewState.alpha = 1f - ambientState.getHideAmount(); + } } if (view.mustStayOnScreen() && viewState.yTranslation >= 0) {