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

Commit 864db4b0 authored by Jean Chalard's avatar Jean Chalard
Browse files

A small simplification.

It's useless to setAutoCorrection(getTypedWord()). Every time the
contents of the word composer are altered, the auto-correction is
reset, and at use time if it's null then the typed word is used
anyway.

Change-Id: I0870657a1ab3f456f376995b27e70703f7a5d23a
parent 997cba7d
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -997,9 +997,6 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
        final boolean isAutoCorrection = false;
        setSuggestionStrip(suggestedWords, isAutoCorrection);
        setAutoCorrectionIndicator(isAutoCorrection);
        // TODO: is this the right thing to do? What should we auto-correct to in
        // this case? This says to keep whatever the user typed.
        mWordComposer.setAutoCorrection(mWordComposer.getTypedWord());
        setSuggestionStripShown(true);
        if (ProductionFlag.IS_EXPERIMENTAL) {
            ResearchLogger.latinIME_onDisplayCompletions(applicationSpecifiedCompletions);
@@ -1989,7 +1986,6 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
            if (mWordComposer.isComposingWord()) {
                Log.w(TAG, "Called updateSuggestionsOrPredictions but suggestions were not "
                        + "requested!");
                mWordComposer.setAutoCorrection(mWordComposer.getTypedWord());
            }
            return;
        }