[flexiglass] Remove an unflagged change from StackScrollAlgorithm
StackScrollAlgorithm#updateAlphaState received an unflagged change in I709b0e1fc188b3cd0b6554837ac757af049c816f, which hits reads a flexi field from AmbientState and hits an SceneContainerFlag.isUnexpectedlyInLegacyMode assertion. This is a forward fix to restore the legacy codepath.
Change-Id: Idf13b559a5154bf86e27be3aa458d880e3e85125
Fixes: 370452903
Test: open app shortcuts while being in split shade
Flag: com.android.systemui.scene_container
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 e0b0ccd..109f0ae 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
@@ -148,22 +148,29 @@
if (isHunGoingToShade) {
// Keep 100% opacity for heads up notification going to shade.
viewState.setAlpha(1f);
- } else if ((!SceneContainerFlag.isEnabled() && ambientState.isOnKeyguard())
- || ambientState.isShowingStackOnLockscreen()) {
+ } else if (!SceneContainerFlag.isEnabled() && ambientState.isOnKeyguard()) {
// Adjust alpha for wakeup to lockscreen.
if (view.isHeadsUpState()) {
- // Pulsing HUN should be visible on AOD and stay visible during
+ // Pulsing HUN should be visible on AOD and stay visible during
// AOD=>lockscreen transition
viewState.setAlpha(1f - ambientState.getHideAmount());
- } else if (SceneContainerFlag.isEnabled()) {
+ } else {
+ // Normal notifications are hidden on AOD and should fade in during
+ // AOD=>lockscreen transition
+ viewState.setAlpha(1f - ambientState.getDozeAmount());
+ }
+ } else if (SceneContainerFlag.isEnabled()
+ && ambientState.isShowingStackOnLockscreen()) {
+ // Adjust alpha for wakeup to lockscreen.
+ if (view.isHeadsUpState()) {
+ // Pulsing HUN should be visible on AOD and stay visible during
+ // AOD=>lockscreen transition
+ viewState.setAlpha(1f - ambientState.getHideAmount());
+ } else {
// Take into account scene container-specific Lockscreen fade-in progress
float fadeAlpha = ambientState.getLockscreenStackFadeInProgress();
float dozeAlpha = 1f - ambientState.getDozeAmount();
viewState.setAlpha(Math.min(dozeAlpha, fadeAlpha));
- } else {
- // Normal notifications are hidden on AOD and should fade in during
- // AOD=>lockscreen transition
- viewState.setAlpha(1f - ambientState.getDozeAmount());
}
} else if (ambientState.isExpansionChanging()) {
// Adjust alpha for shade open & close.