Merge "Fix disappearing notifications when closing fullscreen QS" into sc-dev am: 68f26fd955

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14789088

Change-Id: I695f7144f09fe85c1c4a00d8dced86dc31cea5b7
This commit is contained in:
Lyn Han
2021-06-02 15:25:02 +00:00
committed by Automerger Merge Worker

View File

@@ -382,13 +382,15 @@ public class StackScrollAlgorithm {
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 (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 */);
}
if (view.mustStayOnScreen() && viewState.yTranslation >= 0) {