summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt27
1 files changed, 18 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
index f39af18afcea..472e7794cd0a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt
@@ -475,19 +475,28 @@ constructor(
}
fun keyguardAlpha(viewState: ViewStateAccessor, scope: CoroutineScope): Flow<Float> {
- // Transitions are not (yet) authoritative for NSSL; they still rely on StatusBarState to
- // help determine when the device has fully moved to GONE or OCCLUDED state. Once SHADE
- // state has been set, let shade alpha take over
- val isKeyguardNotVisible =
- combine(
+ val isKeyguardOccluded =
+ keyguardTransitionInteractor.transitionValue(OCCLUDED).map { it == 1f }
+
+ val isKeyguardNotVisibleInState =
+ if (SceneContainerFlag.isEnabled) {
+ isKeyguardOccluded
+ } else {
anyOf(
- keyguardTransitionInteractor.transitionValue(OCCLUDED).map { it == 1f },
+ isKeyguardOccluded,
keyguardTransitionInteractor
.transitionValue(scene = Scenes.Gone, stateWithoutSceneContainer = GONE)
.map { it == 1f },
- ),
- keyguardInteractor.statusBarState,
- ) { isKeyguardNotVisibleInState, statusBarState ->
+ )
+ }
+
+ // Transitions are not (yet) authoritative for NSSL; they still rely on StatusBarState to
+ // help determine when the device has fully moved to GONE or OCCLUDED state. Once SHADE
+ // state has been set, let shade alpha take over
+ val isKeyguardNotVisible =
+ combine(isKeyguardNotVisibleInState, keyguardInteractor.statusBarState) {
+ isKeyguardNotVisibleInState,
+ statusBarState ->
isKeyguardNotVisibleInState && statusBarState == SHADE
}