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

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

Merge "Small reorganization"

parents d492e2bf 195419b1
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -1857,6 +1857,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
                || mSuggestionsView.isShowingAddToDictionaryHint()) {
            builder.setTypedWordValid(!allowsToBeAutoCorrected).setHasMinimalSuggestion(
                    autoCorrectionAvailable);
            if (Suggest.shouldBlockAutoCorrectionBySafetyNet(builder, mSuggest,
                    mSettingsValues.mAutoCorrectionThreshold)) {
                builder.setShouldBlockAutoCorrectionBySafetyNet();
            }
            showSuggestions(builder.build(), typedWord);
        } else {
            SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions();
            if (previousSuggestions == mSettingsValues.mSuggestPuncList) {
@@ -1866,13 +1871,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
                previousSuggestions = SuggestedWords.EMPTY;
            }
            builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions);
        }
        if (Suggest.shouldBlockAutoCorrectionBySafetyNet(builder, mSuggest,
                mSettingsValues.mAutoCorrectionThreshold)) {
            builder.setShouldBlockAutoCorrectionBySafetyNet();
        }
            showSuggestions(builder.build(), typedWord);
        }
    }

    public void showSuggestions(final SuggestedWords suggestedWords, final CharSequence typedWord) {
        final CharSequence autoCorrection;