Merge "Keep HUN opaque for transition to shade" into sc-dev

This commit is contained in:
Lucas Dupin
2021-05-26 21:36:23 +00:00
committed by Android (Google) Code Review

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