From fe0529714e2e918e982f71eb88bc481d8e60180f Mon Sep 17 00:00:00 2001 From: Kurt Partridge Date: Tue, 16 Apr 2013 10:44:20 -0700 Subject: [PATCH] Label logUnits after LatinImeOnEndBatchInput Previously only a commitText would cause a LogUnit to be labeled with the word that the data generates. In the case of gestured text, this information is available when LatinIME#onEndBatchInput is called. Labeling the LogUnit at this time means that the Log will have labeled words even if stop() is called before commit. Change-Id: Idb2f99a9c159a1b1aa00448a2ecddeca6c351c3e --- java/src/com/android/inputmethod/research/ResearchLogger.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java index 7a23ddb05..f6dc47b0d 100644 --- a/java/src/com/android/inputmethod/research/ResearchLogger.java +++ b/java/src/com/android/inputmethod/research/ResearchLogger.java @@ -1826,6 +1826,9 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang public static void latinIME_onEndBatchInput(final CharSequence enteredText, final int enteredWordPos, final SuggestedWords suggestedWords) { final ResearchLogger researchLogger = getInstance(); + if (!TextUtils.isEmpty(enteredText) && hasLetters(enteredText.toString())) { + researchLogger.mCurrentLogUnit.setWord(enteredText.toString()); + } researchLogger.enqueueEvent(LOGSTATEMENT_LATINIME_ONENDBATCHINPUT, enteredText, enteredWordPos); researchLogger.mCurrentLogUnit.initializeSuggestions(suggestedWords);