Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe052971 authored by Kurt Partridge's avatar Kurt Partridge
Browse files

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
parent 3970352e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);