Keep HUN opaque for transition to shade

Bug: 189145086
Test: swipe down from hun to go to shade => hun stays opaque
Change-Id: I5de477b86f5e6a776c91d6039e78d406c8d896a4
This commit is contained in:
Lyn Han
2021-05-26 12:47:02 -05:00
parent 79e39e8e77
commit a5ebc89c52

View File

@@ -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) {