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

Commit 211eac41 authored by Austin Delgado's avatar Austin Delgado
Browse files

Update BP to dismiss when shade is interacted with

Test: AuthContainerViewTest
Bug: 422322086
Flag: EXEMPT bugfix
Change-Id: I354f03237c643a13617579acdddbde745a05545f
parent 743bc3d4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import com.android.systemui.jank.interactionJankMonitor
import com.android.systemui.keyguard.wakefulnessLifecycle
import com.android.systemui.kosmos.testScope
import com.android.systemui.res.R
import com.android.systemui.shade.data.repository.fakeShadeRepository
import com.android.systemui.testKosmos
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.test.runCurrent
@@ -97,6 +98,7 @@ open class AuthContainerViewTest : SysuiTestCase() {

    private val testScope = kosmos.testScope
    private val fakeExecutor = kosmos.fakeExecutor
    private val fakeShadeRepository = kosmos.fakeShadeRepository

    private val defaultLogoIcon = context.getDrawable(R.drawable.ic_android)

@@ -152,7 +154,7 @@ open class AuthContainerViewTest : SysuiTestCase() {
    }

    @Test
    fun testDismissOnShadeDown() {
    fun testDismissOnShadeInteraction() {
        val container = initializeFingerprintContainer(addToView = true)
        assertThat(container.parent).isNotNull()
        val root = container.rootView
+2 −2
Original line number Diff line number Diff line
@@ -305,8 +305,8 @@ object BiometricViewBinder {
                }

                launch {
                    viewModel.isShadeExpanded.collect { isShadeExpanded ->
                        if (isShadeExpanded) {
                    viewModel.isShadeInteracted.collect { isShadeInteracted ->
                        if (isShadeInteracted) {
                            legacyCallback.onUserCanceled()
                        }
                    }
+2 −2
Original line number Diff line number Diff line
@@ -147,8 +147,8 @@ object CredentialViewBinder {
                }

                launch {
                    viewModel.isShadeExpanded.collect { isShadeExpanded ->
                        if (isShadeExpanded) {
                    viewModel.isShadeInteracted.collect { isShadeInteracted ->
                        if (isShadeInteracted) {
                            host.onCredentialAborted()
                        }
                    }
+2 −2
Original line number Diff line number Diff line
@@ -75,8 +75,8 @@ constructor(
            }
        }

    /** Whether the shade is expanded */
    val isShadeExpanded = shadeInteractor.isShadeAnyExpanded
    /** Whether the shade is being interacted with */
    val isShadeInteracted = shadeInteractor.isUserInteracting

    /** Input flags for text based credential views */
    val inputFlags: Flow<Int?> =
+2 −2
Original line number Diff line number Diff line
@@ -112,8 +112,8 @@ constructor(
            .map { it?.modalities ?: BiometricModalities() }
            .distinctUntilChanged()

    /** Whether the shade is expanded */
    val isShadeExpanded = shadeInteractor.isShadeAnyExpanded
    /** Whether the shade is being interacted with */
    val isShadeInteracted = shadeInteractor.isUserInteracting

    val udfpsAccessibilityOverlayViewModel =
        BiometricPromptUdfpsAccessibilityOverlayViewModel(