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

Commit ed0ffbba authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Update BP to dismiss when shade is interacted with" into main

parents c959ca6b 211eac41
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -59,6 +59,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
@@ -99,6 +100,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)

@@ -156,7 +158,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
@@ -90,8 +90,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(