Loading core/java/android/view/inputmethod/BaseInputConnection.java +11 −2 Original line number Diff line number Diff line Loading @@ -340,10 +340,19 @@ public class BaseInputConnection implements InputConnection { } /** * The default implementation does nothing. * The default implementation turns this into the enter key. */ public boolean performEditorAction(int actionCode) { return false; long eventTime = SystemClock.uptimeMillis(); sendKeyEvent(new KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER, 0, 0, 0, 0, KeyEvent.FLAG_SOFT_KEYBOARD | KeyEvent.FLAG_KEEP_TOUCH_MODE | KeyEvent.FLAG_EDITOR_ACTION)); sendKeyEvent(new KeyEvent(SystemClock.uptimeMillis(), eventTime, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_ENTER, 0, 0, 0, 0, KeyEvent.FLAG_SOFT_KEYBOARD | KeyEvent.FLAG_KEEP_TOUCH_MODE | KeyEvent.FLAG_EDITOR_ACTION)); return true; } /** Loading Loading
core/java/android/view/inputmethod/BaseInputConnection.java +11 −2 Original line number Diff line number Diff line Loading @@ -340,10 +340,19 @@ public class BaseInputConnection implements InputConnection { } /** * The default implementation does nothing. * The default implementation turns this into the enter key. */ public boolean performEditorAction(int actionCode) { return false; long eventTime = SystemClock.uptimeMillis(); sendKeyEvent(new KeyEvent(eventTime, eventTime, KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER, 0, 0, 0, 0, KeyEvent.FLAG_SOFT_KEYBOARD | KeyEvent.FLAG_KEEP_TOUCH_MODE | KeyEvent.FLAG_EDITOR_ACTION)); sendKeyEvent(new KeyEvent(SystemClock.uptimeMillis(), eventTime, KeyEvent.ACTION_UP, KeyEvent.KEYCODE_ENTER, 0, 0, 0, 0, KeyEvent.FLAG_SOFT_KEYBOARD | KeyEvent.FLAG_KEEP_TOUCH_MODE | KeyEvent.FLAG_EDITOR_ACTION)); return true; } /** Loading