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

Commit 21b88245 authored by Alexandre Dumont's avatar Alexandre Dumont Committed by Gerrit Code Review
Browse files

Prevent Sym key from showing the IME picker

By default InputMethodManager will popup an IME picker when pressing
the Sym key.

This can be disabled by setting config_symKeyShowsImePicker to false in the
overlay (so the Sym key will show the symbol windows selector for ex.)

Ported from jellybean (was Change-Id: Id61e2d1d66babbb5bd15d7dcf280c1cb76bced46)
http://review.cyanogenmod.org/25787



Signed-off-by: default avatarMichael Bestas <mikeioannina@gmail.com>

Change-Id: I5ee2542c081dca14d2e22724cc2616519716dd45
parent 0cf5d285
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1572,10 +1572,12 @@ public final class InputMethodManager {
            if (DEBUG) Log.d(TAG, "dispatchKeyEvent");

            if (mCurMethod != null) {
                if (context.getResources().getBoolean(com.android.internal.R.bool.config_symKeyShowsImePicker)) {
                    if (key.getAction() == KeyEvent.ACTION_DOWN
                            && key.getKeyCode() == KeyEvent.KEYCODE_SYM) {
                        showInputMethodPickerLocked();
                        handled = true;
                    }
                } else {
                    try {
                        if (DEBUG) Log.v(TAG, "DISPATCH KEY: " + mCurMethod);
+2 −0
Original line number Diff line number Diff line
@@ -1124,4 +1124,6 @@
         Requires config_hasDockBattery set to true. -->
    <string name="config_deviceDockBatteryHandlerLib" translatable="false"></string>

    <!-- True if the Sym key should open the InputMethodPicker (default) -->
    <bool name="config_symKeyShowsImePicker">true</bool>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -1926,4 +1926,6 @@
  <java-symbol type="drawable" name="ic_navigation_ring_torch_off" />
  <java-symbol type="drawable" name="ic_navigation_ring_vibrate" />

  <!-- IME Picker showing upon pressing Sym Key -->
  <java-symbol type="bool" name="config_symKeyShowsImePicker" />
</resources>