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
main
Kurt Partridge 2013-04-16 10:44:20 -07:00
parent 3970352ea9
commit fe0529714e
1 changed files with 3 additions and 0 deletions

View File

@ -1826,6 +1826,9 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
public static void latinIME_onEndBatchInput(final CharSequence enteredText, public static void latinIME_onEndBatchInput(final CharSequence enteredText,
final int enteredWordPos, final SuggestedWords suggestedWords) { final int enteredWordPos, final SuggestedWords suggestedWords) {
final ResearchLogger researchLogger = getInstance(); final ResearchLogger researchLogger = getInstance();
if (!TextUtils.isEmpty(enteredText) && hasLetters(enteredText.toString())) {
researchLogger.mCurrentLogUnit.setWord(enteredText.toString());
}
researchLogger.enqueueEvent(LOGSTATEMENT_LATINIME_ONENDBATCHINPUT, enteredText, researchLogger.enqueueEvent(LOGSTATEMENT_LATINIME_ONENDBATCHINPUT, enteredText,
enteredWordPos); enteredWordPos);
researchLogger.mCurrentLogUnit.initializeSuggestions(suggestedWords); researchLogger.mCurrentLogUnit.initializeSuggestions(suggestedWords);