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

Commit 6b99325b authored by George Mount's avatar George Mount Committed by Android (Google) Code Review
Browse files

Merge "Change access to action bar to control-<"

parents d3b8e520 cbe28358
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -2843,17 +2843,16 @@ public class Activity extends ContextThemeWrapper
        if (keyCode == KeyEvent.KEYCODE_MENU &&
                mActionBar != null && mActionBar.onMenuKeyEvent(event)) {
            return true;
        } else if (keyCode == KeyEvent.KEYCODE_DPAD_UP) {
            // Capture the Alt-up and send focus to the ActionBar
        } else if (event.isCtrlPressed() &&
                event.getUnicodeChar(event.getMetaState() & ~KeyEvent.META_CTRL_MASK) == '<') {
            // Capture the Control-< and send focus to the ActionBar
            final int action = event.getAction();
            if (action == KeyEvent.ACTION_DOWN) {
                if (event.hasModifiers(KeyEvent.META_ALT_ON)) {
                final ActionBar actionBar = getActionBar();
                if (actionBar != null && actionBar.isShowing() && actionBar.requestFocus()) {
                    mEatKeyUpEvent = true;
                    return true;
                }
                }
            } else if (action == KeyEvent.ACTION_UP && mEatKeyUpEvent) {
                mEatKeyUpEvent = false;
                return true;