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

Commit 826ba5cf authored by Danny Burakov's avatar Danny Burakov Committed by Android (Google) Code Review
Browse files

Merge "[flexiglass] Rename `BouncerInteractor.hide` to `onImeHidden`." into main

parents 7f8bbdee 329c950d
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -235,17 +235,16 @@ constructor(
        repository.setMessage(errorMessage(authenticationInteractor.getAuthenticationMethod()))
    }

    /** If the bouncer is showing, hides the bouncer and return to the lockscreen scene. */
    fun hide(
        loggingReason: String,
    ) {
    /** Notifies the interactor that the input method editor has been hidden. */
    fun onImeHidden() {
        // If the bouncer is showing, hide it and return to the lockscreen scene.
        if (sceneInteractor.desiredScene.value.key != SceneKey.Bouncer) {
            return
        }

        sceneInteractor.changeScene(
            scene = SceneModel(SceneKey.Lockscreen),
            loggingReason = loggingReason,
            loggingReason = "IME hidden",
        )
    }

+1 −4
Original line number Diff line number Diff line
@@ -78,10 +78,7 @@ sealed class AuthMethodBouncerViewModel(
     */
    fun onImeVisibilityChanged(isVisible: Boolean) {
        if (isImeVisible && !isVisible) {
            // The IME has gone from visible to invisible, dismiss the bouncer.
            interactor.hide(
                loggingReason = "IME hidden",
            )
            interactor.onImeHidden()
        }

        isImeVisible = isVisible
+2 −2
Original line number Diff line number Diff line
@@ -395,7 +395,7 @@ class BouncerInteractorTest : SysuiTestCase() {
            val bouncerSceneKey = currentScene?.key
            assertThat(bouncerSceneKey).isEqualTo(SceneKey.Bouncer)

            underTest.hide("")
            underTest.onImeHidden()

            assertThat(currentScene?.key).isEqualTo(SceneKey.Lockscreen)
        }
@@ -409,7 +409,7 @@ class BouncerInteractorTest : SysuiTestCase() {
            val notBouncerSceneKey = currentScene?.key
            assertThat(notBouncerSceneKey).isNotEqualTo(SceneKey.Bouncer)

            underTest.hide("")
            underTest.onImeHidden()

            assertThat(currentScene?.key).isEqualTo(notBouncerSceneKey)
        }