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

Commit ea80c133 authored by Beverly's avatar Beverly Committed by Beverly Tai
Browse files

Revert menu key updated functionality to avoid unnecessary IPCs

Test: FoldToAodMicrobenchmark
Fixes: 308003266
Flag: NONE
Change-Id: Ia0dfaed05fa43317d5ea1c947a8929d40235e7d5
parent 96ef4624
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()