aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammadinamul Sheik <inamul@google.com>2014-09-22 02:13:19 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-22 02:13:21 +0000
commit8f116d7cdab57ef6bdccb870240d548a437ca0c9 (patch)
treeb1e3ffecef1f90efc812d02f7968c5856e233f33
parent1c810c6725e860a625e9eb403d0a81e8a64e6d62 (diff)
parent6901ea6eacf719042e1af6f3d64c226e41c3c5e9 (diff)
downloadlatinime-8f116d7cdab57ef6bdccb870240d548a437ca0c9.tar.gz
latinime-8f116d7cdab57ef6bdccb870240d548a437ca0c9.tar.xz
latinime-8f116d7cdab57ef6bdccb870240d548a437ca0c9.zip
Merge "Invoke onWordCommitUserTyped on startInput() with non empty wordcomposer"
-rw-r--r--java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java7
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;