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
diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java
index 7a23ddb..f6dc47b 100644
--- a/java/src/com/android/inputmethod/research/ResearchLogger.java
+++ b/java/src/com/android/inputmethod/research/ResearchLogger.java
@@ -1826,6 +1826,9 @@
     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);