diff options
author | 2014-09-22 02:24:56 +0000 | |
---|---|---|
committer | 2014-09-22 02:24:56 +0000 | |
commit | ab4a6604d1dd61515899b838cd09df436731e48f (patch) | |
tree | 1b3459c17d470be592af62b0d914f7bd9f01a503 /java/src/com/android/inputmethod | |
parent | b47ac5bb4353e7ed60bf2f7c7818f76a8de91a6a (diff) | |
parent | 8f116d7cdab57ef6bdccb870240d548a437ca0c9 (diff) | |
download | latinime-ab4a6604d1dd61515899b838cd09df436731e48f.tar.gz latinime-ab4a6604d1dd61515899b838cd09df436731e48f.tar.xz latinime-ab4a6604d1dd61515899b838cd09df436731e48f.zip |
am 8f116d7c: Merge "Invoke onWordCommitUserTyped on startInput() with non empty wordcomposer"
* commit '8f116d7cdab57ef6bdccb870240d548a437ca0c9':
Invoke onWordCommitUserTyped on startInput() with non empty wordcomposer
Diffstat (limited to 'java/src/com/android/inputmethod')
-rw-r--r-- | java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 8eccd5cee..18c740bd7 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -145,6 +145,13 @@ public final class InputLogic { */ public void startInput(final String combiningSpec, final SettingsValues settingsValues) { mEnteredText = null; + if (!mWordComposer.getTypedWord().isEmpty()) { + // For messaging apps that offer send button, the IME does not get the opportunity + // to capture the last word. This block should capture those uncommitted words. + // The timestamp at which it is captured is not accurate but close enough. + StatsUtils.onWordCommitUserTyped( + mWordComposer.getTypedWord(), mWordComposer.isBatchMode()); + } mWordComposer.restartCombining(combiningSpec); resetComposingState(true /* alsoResetLastComposedWord */); mDeleteCount = 0; |