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

Commit 087ecbfe authored by Ale Nijamkin's avatar Ale Nijamkin
Browse files

[flexiglass] Adds support for showing bouncer in BiometricTestExtensions

Bug: 283121968
Test: N/A test is now passing locally
Flag: EXEMPT test fix only
Change-Id: Ie10fc03008d419e61986e18b115ba8721a2e30f6
parent f6547f7c
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -34,6 +34,9 @@ import com.android.systemui.biometrics.shared.model.AuthenticationReason
import com.android.systemui.bouncer.data.repository.keyguardBouncerRepository
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.res.R
import com.android.systemui.scene.domain.interactor.sceneInteractor
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.scene.shared.model.Overlays
import com.android.systemui.util.mockito.whenever
import kotlinx.coroutines.test.TestScope
import kotlinx.coroutines.test.runCurrent
@@ -205,8 +208,16 @@ internal fun updatePrimaryBouncer(
    fpsDetectionRunning: Boolean,
    isUnlockingWithFpAllowed: Boolean,
) {
    if (SceneContainerFlag.isEnabled) {
        if (isShowing) {
            kosmos.sceneInteractor.showOverlay(Overlays.Bouncer, "")
        } else {
            kosmos.sceneInteractor.hideOverlay(Overlays.Bouncer, "")
        }
    } else {
        kosmos.keyguardBouncerRepository.setPrimaryShow(isShowing)
        kosmos.keyguardBouncerRepository.setPrimaryStartingToHide(false)
    }
    val primaryStartDisappearAnimation = if (isAnimatingAway) Runnable {} else null
    kosmos.keyguardBouncerRepository.setPrimaryStartDisappearAnimation(
        primaryStartDisappearAnimation