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

Commit 7eea6131 authored by Phil Tunstall's avatar Phil Tunstall
Browse files

Make lock screen menu button actions work regardless of rebinding

Fixes 'Menu unlock' and (Lock screen->Button actions->)'Long press Menu button'
when the menu button is assigned to an action other than its default.

Change-Id: I4c2e2cf47fa2f0c171e3599cdc36bc744a708c3b
parent ae44434c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2384,7 +2384,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
            // Hijack modified menu keys for debugging features
            final int chordBug = KeyEvent.META_SHIFT_ON;

            if (virtualKey) {
            if (virtualKey || keyguardOn) {
                // Let the app handle the key
                return 0;
            }
@@ -2417,7 +2417,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                        return -1;
                    }
                } else if (longPress) {
                    if (!keyguardOn && mLongPressOnMenuBehavior != KEY_ACTION_NOTHING) {
                    if (mLongPressOnMenuBehavior != KEY_ACTION_NOTHING) {
                        if (mLongPressOnMenuBehavior != KEY_ACTION_APP_SWITCH) {
                            cancelPreloadRecentApps();
                        }
@@ -2435,7 +2435,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    if (mPressOnMenuBehavior != KEY_ACTION_APP_SWITCH) {
                        cancelPreloadRecentApps();
                    }
                    if (!canceled && !keyguardOn) {
                    if (!canceled) {
                        performKeyAction(mPressOnMenuBehavior);
                    }
                }