Small reorganization
...resulting in a slight optimization Change-Id: I83a9b8c92c3d93ce75988285997ec138b3ffe52e
This commit is contained in:
parent
df0c7711a7
commit
195419b1ec
1 changed files with 6 additions and 5 deletions
|
@ -1857,6 +1857,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
|| mSuggestionsView.isShowingAddToDictionaryHint()) {
|
|| mSuggestionsView.isShowingAddToDictionaryHint()) {
|
||||||
builder.setTypedWordValid(!allowsToBeAutoCorrected).setHasMinimalSuggestion(
|
builder.setTypedWordValid(!allowsToBeAutoCorrected).setHasMinimalSuggestion(
|
||||||
autoCorrectionAvailable);
|
autoCorrectionAvailable);
|
||||||
|
if (Suggest.shouldBlockAutoCorrectionBySafetyNet(builder, mSuggest,
|
||||||
|
mSettingsValues.mAutoCorrectionThreshold)) {
|
||||||
|
builder.setShouldBlockAutoCorrectionBySafetyNet();
|
||||||
|
}
|
||||||
|
showSuggestions(builder.build(), typedWord);
|
||||||
} else {
|
} else {
|
||||||
SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions();
|
SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions();
|
||||||
if (previousSuggestions == mSettingsValues.mSuggestPuncList) {
|
if (previousSuggestions == mSettingsValues.mSuggestPuncList) {
|
||||||
|
@ -1866,12 +1871,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
previousSuggestions = SuggestedWords.EMPTY;
|
previousSuggestions = SuggestedWords.EMPTY;
|
||||||
}
|
}
|
||||||
builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions);
|
builder.addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions);
|
||||||
|
showSuggestions(builder.build(), typedWord);
|
||||||
}
|
}
|
||||||
if (Suggest.shouldBlockAutoCorrectionBySafetyNet(builder, mSuggest,
|
|
||||||
mSettingsValues.mAutoCorrectionThreshold)) {
|
|
||||||
builder.setShouldBlockAutoCorrectionBySafetyNet();
|
|
||||||
}
|
|
||||||
showSuggestions(builder.build(), typedWord);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showSuggestions(final SuggestedWords suggestedWords, final CharSequence typedWord) {
|
public void showSuggestions(final SuggestedWords suggestedWords, final CharSequence typedWord) {
|
||||||
|
|
Loading…
Reference in a new issue