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

Commit b71891cb authored by Josep del Rio's avatar Josep del Rio
Browse files

Intercept key up after handling Ctrl+space

At the moment we are only handling the key down for the Ctrl+Space
shortcut, and we are passing down the key up which could
potentially cause additional actions.

Bug: 327198899
Flag: NA
Test: Flashed on device
Change-Id: Ie189200c7803d829ea491f066fe59b43a4e4c16c
parent 4b030612
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3627,6 +3627,7 @@ public class InputMethodService extends AbstractInputMethodService {
            if (mDecorViewVisible && mWindowVisible) {
                int direction = (event.getMetaState() & KeyEvent.META_SHIFT_MASK) != 0 ? -1 : 1;
                mPrivOps.switchKeyboardLayoutAsync(direction);
                event.startTracking();
                return true;
            }
        }
@@ -3679,7 +3680,12 @@ public class InputMethodService extends AbstractInputMethodService {
            if (event.isTracking() && !event.isCanceled()) {
                return handleBack(true);
            }
        } else if (event.getKeyCode() == KeyEvent.KEYCODE_SPACE) {
            if (event.isTracking() && !event.isCanceled()) {
                return true;
            }
        }

        return doMovementKey(keyCode, event, MOVEMENT_UP);
    }