Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 366ab12f authored by András Kurucz's avatar András Kurucz
Browse files

[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
parent ac7e8d09
Loading
Loading
Loading
Loading
+15 −8
Original line number Diff line number Diff line
@@ -148,23 +148,30 @@ public class StackScrollAlgorithm {
            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
                    // AOD=>lockscreen transition
                    viewState.setAlpha(1f - ambientState.getHideAmount());
                } else if (SceneContainerFlag.isEnabled()) {
                    // 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 (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 if (ambientState.isExpansionChanging()) {
                // Adjust alpha for shade open & close.
                float expansion = ambientState.getExpansionFraction();