diff options
author | 2014-03-19 15:59:49 +0900 | |
---|---|---|
committer | 2014-03-20 19:47:01 +0900 | |
commit | 058a38988b607e1364e6491b97960d2044ad5068 (patch) | |
tree | 6e6dbea803726ed00ab04a87c4448d778e78b51a /java/src/com/android/inputmethod/latin | |
parent | 83372e75e4fc030e77de470e08cf7012436c759a (diff) | |
download | latinime-058a38988b607e1364e6491b97960d2044ad5068.tar.gz latinime-058a38988b607e1364e6491b97960d2044ad5068.tar.xz latinime-058a38988b607e1364e6491b97960d2044ad5068.zip |
[CB10] Add an event for string input
Change-Id: Ie5da6c73d4df4553067c58cd0dce9abb34534250
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 fc5c7f7ec..714ef0af3 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1296,7 +1296,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 3c7e67693..62c752ef2 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -159,11 +159,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); |