summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Shawn Lee <syeonlee@google.com> 2024-10-22 17:37:03 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-10-22 17:37:03 +0000
commit7481be3cfbe01b6acd17073019f493c8c689619e (patch)
tree738ba1159fa8408148f1e3654f6d015562af1f3e
parent6e7b24e82031d5053d2d807dd2e6e1e700f63e2e (diff)
parentb39dded2a2589b366950e82c7da2ba427acdf2f0 (diff)
Merge "[flexiglass] use LSToGoneTransitionViewModel for keyguardAlpha during LS -> GONE" into main
-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 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
}