diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java | 23 |
1 files changed, 15 insertions, 8 deletions
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 e0b0ccd9e840..109f0ae41d76 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 @@ 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 + // 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. |