diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModel.kt | 27 |
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 878ae91391e9..9515029962ea 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 @@ -484,19 +484,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 } |