diff options
author | 2014-03-20 11:34:16 +0000 | |
---|---|---|
committer | 2014-03-20 11:34:16 +0000 | |
commit | 4df6bc0853fa5211416614130d1c027e6d0da210 (patch) | |
tree | 56b1849db330f33ec2858ff909a98cc9a8d496fc /java/src/com/android/inputmethod/latin | |
parent | b20dad6fab49f71b8eb4ee0ce49bd2643c92944c (diff) | |
parent | 058a38988b607e1364e6491b97960d2044ad5068 (diff) | |
download | latinime-4df6bc0853fa5211416614130d1c027e6d0da210.tar.gz latinime-4df6bc0853fa5211416614130d1c027e6d0da210.tar.xz latinime-4df6bc0853fa5211416614130d1c027e6d0da210.zip |
Merge "[CB10] Add an event for string input"
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 4 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index b6d477629..38e386493 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1277,7 +1277,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // Called from PointerTracker through the KeyboardActionListener interface @Override public void onTextInput(final String rawText) { - mInputLogic.onTextInput(mSettings.getCurrent(), rawText, mHandler); + // TODO: have the keyboard pass the correct key code when we need it. + final Event event = Event.createSoftwareTextEvent(rawText, Event.NOT_A_KEY_CODE); + mInputLogic.onTextInput(mSettings.getCurrent(), event, mHandler); mKeyboardSwitcher.updateShiftState(); mKeyboardSwitcher.onCodeInput(Constants.CODE_OUTPUT_TEXT); } diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 8faf17584..36b30eabe 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -161,11 +161,12 @@ public final class InputLogic { * some additional keys for example. * * @param settingsValues the current values of the settings. - * @param rawText the text to input. + * @param event the input event containing the data. */ - public void onTextInput(final SettingsValues settingsValues, final String rawText, + public void onTextInput(final SettingsValues settingsValues, final Event event, // TODO: remove this argument final LatinIME.UIHandler handler) { + final String rawText = event.mText.toString(); mConnection.beginBatchEdit(); if (mWordComposer.isComposingWord()) { commitCurrentAutoCorrection(settingsValues, rawText, handler); |