Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3d0c48b authored by Aaron Liu's avatar Aaron Liu
Browse files

Revert "Lockscreen is invisible"

This reverts commit ccf8f248.

Reason for revert: breaks aod animation

Fixes: 324053898

Change-Id: I65d2d3b154906e43068208fb6e472907a57d9eae
parent ccf8f248
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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 {