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

Commit 5b9e54c1 authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "[IL88] Simple refactoring"

parents 8f3e37a6 ca819178
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ public final class AccessibilityUtils {
     * @param typedWord the currently typed word
     */
    public void setAutoCorrection(final SuggestedWords suggestedWords, final String typedWord) {
        if (suggestedWords != null && suggestedWords.mWillAutoCorrect) {
        if (suggestedWords.mWillAutoCorrect) {
            mAutoCorrectionWord = suggestedWords.getWord(SuggestedWords.INDEX_OF_AUTO_CORRECTION);
            mTypedWord = typedWord;
        } else {
+1 −1
Original line number Diff line number Diff line
@@ -1434,7 +1434,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
            final String typedWord) {
        if (suggestedWords.isEmpty()) {
            // No auto-correction is available, clear the cached values.
            AccessibilityUtils.getInstance().setAutoCorrection(null, null);
            AccessibilityUtils.getInstance().setAutoCorrection(SuggestedWords.EMPTY, typedWord);
            clearSuggestionStrip();
            return;
        }