diff options
| author | 2024-02-07 21:48:36 +0000 | |
|---|---|---|
| committer | 2024-02-07 21:48:36 +0000 | |
| commit | 6803757a078a17df93fc3448e8a84d151a2dbfdf (patch) | |
| tree | 9ab510e25d3025a4dfa763f64f59bf993ebddadb | |
| parent | f286b13398263e83dfe98d641845cb1cd6a88cf0 (diff) | |
| parent | c3d0c48bfa74f094d68773b0689c0633c22f4129 (diff) | |
Merge "Revert "Lockscreen is invisible"" into main
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodAlphaViewModel.kt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodAlphaViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodAlphaViewModel.kt index 9cf3c955b35c..d4ea728bbffb 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodAlphaViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/AodAlphaViewModel.kt @@ -28,6 +28,7 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.merge +import kotlinx.coroutines.flow.onStart /** Models UI state for the alpha of the AOD (always-on display). */ @SysUISingleton @@ -42,13 +43,15 @@ constructor( /** The alpha level for the entire lockscreen while in AOD. */ val alpha: Flow<Float> = combine( - keyguardTransitionInteractor.currentKeyguardState, + keyguardTransitionInteractor.transitionValue(KeyguardState.GONE).onStart { + emit(0f) + }, merge( keyguardInteractor.keyguardAlpha, occludedToLockscreenTransitionViewModel.lockscreenAlpha, ) - ) { currentKeyguardState, alpha -> - if (currentKeyguardState == KeyguardState.GONE) { + ) { transitionToGone, alpha -> + if (transitionToGone == 1f) { // Ensures content is not visible when in GONE state 0f } else { |