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

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

Merge "[IL92] Straighten out showSuggestionStripWithTypedWord"

parents 5a1f8373 4c6029e5
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -1426,7 +1426,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen

    private void showSuggestionStripWithTypedWord(final SuggestedWords sourceSuggestedWords,
            final String typedWord) {
        // TODO: refactor this
        final SuggestedWords suggestedWords =
                sourceSuggestedWords.isEmpty() ? SuggestedWords.EMPTY : sourceSuggestedWords;
        final String autoCorrection;
@@ -1437,13 +1436,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
            // because it may differ from mWordComposer.mTypedWord.
            autoCorrection = typedWord;
        }
        if (suggestedWords.isEmpty()) {
            AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords, typedWord);
            setSuggestedWords(suggestedWords);
            setAutoCorrectionIndicator(false);
            return;
        }
        if (SuggestedWords.EMPTY != suggestedWords) {
            mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
        }
        setSuggestedWords(suggestedWords);
        setAutoCorrectionIndicator(suggestedWords.mWillAutoCorrect);
        setSuggestionStripShown(isSuggestionsStripVisible());