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

Commit bd18856d authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Check both isDozing and isAodAvailable for aodVisibility.

Test: atest SystemUITests
Flag: EXEMPT bugfix
Bug: 278086361
Change-Id: Ieeb71ec9b1bc2516244db48f80f8a9f88e13a203
parent cc54a24c
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -229,11 +229,14 @@ constructor(
    val aodVisibility: Flow<Boolean> =
        combine(
                keyguardInteractor.isDozing,
                keyguardInteractor.isAodAvailable,
                keyguardInteractor.biometricUnlockState,
            ) { isDozing, biometricUnlockState ->
            ) { isDozing, isAodAvailable, biometricUnlockState ->
                // AOD is visible if we're dozing, unless we are wake and unlocking (where we go
                // directly from AOD to unlocked while dozing).
                isDozing && !BiometricUnlockMode.isWakeAndUnlock(biometricUnlockState.mode)
                isDozing &&
                    isAodAvailable &&
                    !BiometricUnlockMode.isWakeAndUnlock(biometricUnlockState.mode)
            }
            .distinctUntilChanged()