Loading packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt +4 −5 Original line number Diff line number Diff line Loading @@ -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", ) } Loading packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/AuthMethodBouncerViewModel.kt +1 −4 Original line number Diff line number Diff line Loading @@ -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 Loading packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -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) } Loading @@ -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) } Loading Loading
packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractor.kt +4 −5 Original line number Diff line number Diff line Loading @@ -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", ) } Loading
packages/SystemUI/src/com/android/systemui/bouncer/ui/viewmodel/AuthMethodBouncerViewModel.kt +1 −4 Original line number Diff line number Diff line Loading @@ -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 Loading
packages/SystemUI/tests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -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) } Loading @@ -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) } Loading