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

Commit cbe28358 authored by George Mount's avatar George Mount
Browse files

Change access to action bar to control-<

Bug 26423159

Changes the action bar focus change key from Alt-Up to control-<

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