Loading packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt +5 −5 Original line number Diff line number Diff line Loading @@ -286,7 +286,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() { SuccessFingerprintAuthenticationStatus(0, true) ) underTest.attemptDeviceEntry() underTest.attemptDeviceEntry("test") assertThat(currentScene).isEqualTo(Scenes.Gone) } Loading @@ -300,7 +300,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() { fakeAuthenticationRepository.setAuthenticationMethod(None) underTest.attemptDeviceEntry() underTest.attemptDeviceEntry("test") assertThat(currentScene).isEqualTo(Scenes.Gone) } Loading @@ -315,7 +315,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() { fakeDeviceEntryRepository.setLockscreenEnabled(true) fakeAuthenticationRepository.setAuthenticationMethod(None) underTest.attemptDeviceEntry() underTest.attemptDeviceEntry("test") assertThat(currentScene).isEqualTo(Scenes.Gone) } Loading @@ -331,7 +331,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() { fakeFingerprintPropertyRepository.supportsRearFps() // altBouncer unsupported fakeAuthenticationRepository.setAuthenticationMethod(Pin) underTest.attemptDeviceEntry() underTest.attemptDeviceEntry("test") assertThat(currentOverlays).contains(Overlays.Bouncer) } Loading @@ -346,7 +346,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() { fakeAuthenticationRepository.setAuthenticationMethod(Pin) givenCanShowAlternateBouncer() underTest.attemptDeviceEntry() underTest.attemptDeviceEntry("test") assertThat(currentScene).isEqualTo(Scenes.Lockscreen) } Loading packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardKeyEventInteractorTest.kt +4 −4 Original line number Diff line number Diff line Loading @@ -275,7 +275,7 @@ class KeyguardKeyEventInteractorTest : SysuiTestCase() { val actionDownMenuKeyEvent = KeyEvent(KeyEvent.ACTION_DOWN, keycode) assertThat(underTest.dispatchKeyEvent(actionDownMenuKeyEvent)).isFalse() if (SceneContainerFlag.isEnabled) { verify(deviceEntryInteractor, never()).attemptDeviceEntry() verify(deviceEntryInteractor, never()).attemptDeviceEntry("test") } else { verify(statusBarKeyguardViewManager, never()) .showPrimaryBouncer( Loading @@ -288,7 +288,7 @@ class KeyguardKeyEventInteractorTest : SysuiTestCase() { val actionUpMenuKeyEvent = KeyEvent(KeyEvent.ACTION_UP, keycode) assertThat(underTest.dispatchKeyEvent(actionUpMenuKeyEvent)).isTrue() if (SceneContainerFlag.isEnabled) { verify(deviceEntryInteractor).attemptDeviceEntry() verify(deviceEntryInteractor).attemptDeviceEntry("test") } else { verify(statusBarKeyguardViewManager) .showPrimaryBouncer( Loading @@ -303,7 +303,7 @@ class KeyguardKeyEventInteractorTest : SysuiTestCase() { val actionDownMenuKeyEvent = KeyEvent(KeyEvent.ACTION_DOWN, keycode) assertThat(underTest.dispatchKeyEvent(actionDownMenuKeyEvent)).isFalse() verify(shadeController, never()).animateCollapseShadeForced() verify(deviceEntryInteractor, never()).attemptDeviceEntry() verify(deviceEntryInteractor, never()).attemptDeviceEntry("test") verify(statusBarKeyguardViewManager, never()) .showPrimaryBouncer( any(), Loading @@ -314,7 +314,7 @@ class KeyguardKeyEventInteractorTest : SysuiTestCase() { val actionUpMenuKeyEvent = KeyEvent(KeyEvent.ACTION_UP, keycode) assertThat(underTest.dispatchKeyEvent(actionUpMenuKeyEvent)).isFalse() verify(shadeController, never()).animateCollapseShadeForced() verify(deviceEntryInteractor, never()).attemptDeviceEntry() verify(deviceEntryInteractor, never()).attemptDeviceEntry("test") verify(statusBarKeyguardViewManager, never()) .showPrimaryBouncer( any(), Loading packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalLockIconViewModel.kt +1 −1 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ constructor( suspend fun onUserInteraction() { if (SceneContainerFlag.isEnabled) { deviceEntryInteractor.attemptDeviceEntry() deviceEntryInteractor.attemptDeviceEntry("Communal lock icon") } else { keyguardViewController .get() Loading packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractor.kt +6 −3 Original line number Diff line number Diff line Loading @@ -227,7 +227,7 @@ constructor( * canceled */ @JvmOverloads fun attemptDeviceEntry(callback: IKeyguardDismissCallback? = null) { fun attemptDeviceEntry(loggingReason: String, callback: IKeyguardDismissCallback? = null) { callback?.let { dismissCallbackRegistry.get().addCallback(it) } // TODO (b/307768356), Loading @@ -245,7 +245,9 @@ constructor( .get() .showOverlay( overlay = Overlays.Bouncer, loggingReason = "request to unlock device while authentication required", loggingReason = "request to unlock device while authentication" + " required, original reason for request: $loggingReason", ) } } else { Loading @@ -254,7 +256,8 @@ constructor( .changeScene( toScene = Scenes.Gone, loggingReason = "request to unlock device while authentication isn't required", "request to unlock device while authentication isn't required," + " original reason for request: $loggingReason", ) } } Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +2 −1 Original line number Diff line number Diff line Loading @@ -470,7 +470,8 @@ public class KeyguardService extends Service { trace("dismiss message=" + message); checkPermission(); if (SceneContainerFlag.isEnabled()) { mDeviceEntryInteractorLazy.get().attemptDeviceEntry(callback); mDeviceEntryInteractorLazy.get().attemptDeviceEntry( "KeyguardService.dismiss", callback); } else if (KeyguardWmStateRefactor.isEnabled()) { mKeyguardDismissInteractor.dismissKeyguardWithCallback(callback); } else { Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt +5 −5 Original line number Diff line number Diff line Loading @@ -286,7 +286,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() { SuccessFingerprintAuthenticationStatus(0, true) ) underTest.attemptDeviceEntry() underTest.attemptDeviceEntry("test") assertThat(currentScene).isEqualTo(Scenes.Gone) } Loading @@ -300,7 +300,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() { fakeAuthenticationRepository.setAuthenticationMethod(None) underTest.attemptDeviceEntry() underTest.attemptDeviceEntry("test") assertThat(currentScene).isEqualTo(Scenes.Gone) } Loading @@ -315,7 +315,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() { fakeDeviceEntryRepository.setLockscreenEnabled(true) fakeAuthenticationRepository.setAuthenticationMethod(None) underTest.attemptDeviceEntry() underTest.attemptDeviceEntry("test") assertThat(currentScene).isEqualTo(Scenes.Gone) } Loading @@ -331,7 +331,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() { fakeFingerprintPropertyRepository.supportsRearFps() // altBouncer unsupported fakeAuthenticationRepository.setAuthenticationMethod(Pin) underTest.attemptDeviceEntry() underTest.attemptDeviceEntry("test") assertThat(currentOverlays).contains(Overlays.Bouncer) } Loading @@ -346,7 +346,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() { fakeAuthenticationRepository.setAuthenticationMethod(Pin) givenCanShowAlternateBouncer() underTest.attemptDeviceEntry() underTest.attemptDeviceEntry("test") assertThat(currentScene).isEqualTo(Scenes.Lockscreen) } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardKeyEventInteractorTest.kt +4 −4 Original line number Diff line number Diff line Loading @@ -275,7 +275,7 @@ class KeyguardKeyEventInteractorTest : SysuiTestCase() { val actionDownMenuKeyEvent = KeyEvent(KeyEvent.ACTION_DOWN, keycode) assertThat(underTest.dispatchKeyEvent(actionDownMenuKeyEvent)).isFalse() if (SceneContainerFlag.isEnabled) { verify(deviceEntryInteractor, never()).attemptDeviceEntry() verify(deviceEntryInteractor, never()).attemptDeviceEntry("test") } else { verify(statusBarKeyguardViewManager, never()) .showPrimaryBouncer( Loading @@ -288,7 +288,7 @@ class KeyguardKeyEventInteractorTest : SysuiTestCase() { val actionUpMenuKeyEvent = KeyEvent(KeyEvent.ACTION_UP, keycode) assertThat(underTest.dispatchKeyEvent(actionUpMenuKeyEvent)).isTrue() if (SceneContainerFlag.isEnabled) { verify(deviceEntryInteractor).attemptDeviceEntry() verify(deviceEntryInteractor).attemptDeviceEntry("test") } else { verify(statusBarKeyguardViewManager) .showPrimaryBouncer( Loading @@ -303,7 +303,7 @@ class KeyguardKeyEventInteractorTest : SysuiTestCase() { val actionDownMenuKeyEvent = KeyEvent(KeyEvent.ACTION_DOWN, keycode) assertThat(underTest.dispatchKeyEvent(actionDownMenuKeyEvent)).isFalse() verify(shadeController, never()).animateCollapseShadeForced() verify(deviceEntryInteractor, never()).attemptDeviceEntry() verify(deviceEntryInteractor, never()).attemptDeviceEntry("test") verify(statusBarKeyguardViewManager, never()) .showPrimaryBouncer( any(), Loading @@ -314,7 +314,7 @@ class KeyguardKeyEventInteractorTest : SysuiTestCase() { val actionUpMenuKeyEvent = KeyEvent(KeyEvent.ACTION_UP, keycode) assertThat(underTest.dispatchKeyEvent(actionUpMenuKeyEvent)).isFalse() verify(shadeController, never()).animateCollapseShadeForced() verify(deviceEntryInteractor, never()).attemptDeviceEntry() verify(deviceEntryInteractor, never()).attemptDeviceEntry("test") verify(statusBarKeyguardViewManager, never()) .showPrimaryBouncer( any(), Loading
packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalLockIconViewModel.kt +1 −1 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ constructor( suspend fun onUserInteraction() { if (SceneContainerFlag.isEnabled) { deviceEntryInteractor.attemptDeviceEntry() deviceEntryInteractor.attemptDeviceEntry("Communal lock icon") } else { keyguardViewController .get() Loading
packages/SystemUI/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractor.kt +6 −3 Original line number Diff line number Diff line Loading @@ -227,7 +227,7 @@ constructor( * canceled */ @JvmOverloads fun attemptDeviceEntry(callback: IKeyguardDismissCallback? = null) { fun attemptDeviceEntry(loggingReason: String, callback: IKeyguardDismissCallback? = null) { callback?.let { dismissCallbackRegistry.get().addCallback(it) } // TODO (b/307768356), Loading @@ -245,7 +245,9 @@ constructor( .get() .showOverlay( overlay = Overlays.Bouncer, loggingReason = "request to unlock device while authentication required", loggingReason = "request to unlock device while authentication" + " required, original reason for request: $loggingReason", ) } } else { Loading @@ -254,7 +256,8 @@ constructor( .changeScene( toScene = Scenes.Gone, loggingReason = "request to unlock device while authentication isn't required", "request to unlock device while authentication isn't required," + " original reason for request: $loggingReason", ) } } Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +2 −1 Original line number Diff line number Diff line Loading @@ -470,7 +470,8 @@ public class KeyguardService extends Service { trace("dismiss message=" + message); checkPermission(); if (SceneContainerFlag.isEnabled()) { mDeviceEntryInteractorLazy.get().attemptDeviceEntry(callback); mDeviceEntryInteractorLazy.get().attemptDeviceEntry( "KeyguardService.dismiss", callback); } else if (KeyguardWmStateRefactor.isEnabled()) { mKeyguardDismissInteractor.dismissKeyguardWithCallback(callback); } else { Loading