Small reorganization
...resulting in a slight optimization
Change-Id: I83a9b8c92c3d93ce75988285997ec138b3ffe52e
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index a3f422c..6509094 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1857,6 +1857,11 @@
|| 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,12 +1871,8 @@
previousSuggestions = SuggestedWords.EMPTY;
}
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) {