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

Commit bce76161 authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge "Revert menu key updated functionality to avoid unnecessary IPCs" into main

parents a99a5f1a ea80c133
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -60,7 +60,6 @@ constructor(
                    return collapseShadeLockedOrShowPrimaryBouncer()
                }
            }

            when (event.keyCode) {
                KeyEvent.KEYCODE_MENU -> return dispatchMenuKeyEvent()
            }
@@ -98,7 +97,8 @@ constructor(
                (statusBarStateController.state != StatusBarState.SHADE) &&
                statusBarKeyguardViewManager.shouldDismissOnMenuPressed()
        if (shouldUnlockOnMenuPressed) {
            return collapseShadeLockedOrShowPrimaryBouncer()
            shadeController.animateCollapseShadeForced()
            return true
        }
        return false
    }
+0 −9
Original line number Diff line number Diff line
@@ -129,15 +129,6 @@ class KeyguardKeyEventInteractorTest : SysuiTestCase() {
            )
    }

    @Test
    fun dispatchKeyEvent_menuActionUp_awakeKeyguard_showsPrimaryBouncer() {
        powerInteractor.setAwakeForTest()
        whenever(statusBarStateController.state).thenReturn(StatusBarState.KEYGUARD)
        whenever(statusBarKeyguardViewManager.shouldDismissOnMenuPressed()).thenReturn(true)

        verifyActionUpShowsPrimaryBouncer(KeyEvent.KEYCODE_MENU)
    }

    @Test
    fun dispatchKeyEvent_menuActionUp_awakeShadeLocked_collapsesShade() {
        powerInteractor.setAwakeForTest()