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

Commit ed3922db authored by Ale Nijamkin's avatar Ale Nijamkin
Browse files

[flexiglass] Adds logging reason to attemptDeviceEntry

Need some more information to help tackle the attached bug.

Bug: 433950243
Test: saw logging reasons in SceneFramework logs
Flag: com.android.systemui.scene_container
Change-Id: I1f269c95a8659456881c34f4b923730b92ec13fa
parent d70b2373
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() {
                SuccessFingerprintAuthenticationStatus(0, true)
            )

            underTest.attemptDeviceEntry()
            underTest.attemptDeviceEntry("test")

            assertThat(currentScene).isEqualTo(Scenes.Gone)
        }
@@ -300,7 +300,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() {

            fakeAuthenticationRepository.setAuthenticationMethod(None)

            underTest.attemptDeviceEntry()
            underTest.attemptDeviceEntry("test")

            assertThat(currentScene).isEqualTo(Scenes.Gone)
        }
@@ -315,7 +315,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() {
            fakeDeviceEntryRepository.setLockscreenEnabled(true)
            fakeAuthenticationRepository.setAuthenticationMethod(None)

            underTest.attemptDeviceEntry()
            underTest.attemptDeviceEntry("test")

            assertThat(currentScene).isEqualTo(Scenes.Gone)
        }
@@ -331,7 +331,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() {
            fakeFingerprintPropertyRepository.supportsRearFps() // altBouncer unsupported
            fakeAuthenticationRepository.setAuthenticationMethod(Pin)

            underTest.attemptDeviceEntry()
            underTest.attemptDeviceEntry("test")

            assertThat(currentOverlays).contains(Overlays.Bouncer)
        }
@@ -346,7 +346,7 @@ class DeviceEntryInteractorTest : SysuiTestCase() {
            fakeAuthenticationRepository.setAuthenticationMethod(Pin)
            givenCanShowAlternateBouncer()

            underTest.attemptDeviceEntry()
            underTest.attemptDeviceEntry("test")

            assertThat(currentScene).isEqualTo(Scenes.Lockscreen)
        }
+4 −4
Original line number Diff line number Diff line
@@ -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(
@@ -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(
@@ -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(),
@@ -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(),
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ constructor(

    suspend fun onUserInteraction() {
        if (SceneContainerFlag.isEnabled) {
            deviceEntryInteractor.attemptDeviceEntry()
            deviceEntryInteractor.attemptDeviceEntry("Communal lock icon")
        } else {
            keyguardViewController
                .get()
+6 −3
Original line number Diff line number Diff line
@@ -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),
@@ -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 {
@@ -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",
                    )
            }
        }
+2 −1
Original line number Diff line number Diff line
@@ -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