diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index f41972e8b..ec408792c 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -930,7 +930,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar false /* typedWordValid */, false /* hasMinimalSuggestion */, false /* allowsToBeAutoCorrected */, - false /* isPunctuationSuggestions */); + false /* isPunctuationSuggestions */, + false /* shouldBlockAutoCorrectionBySafetyNet */); // When in fullscreen mode, show completions generated by the application final SuggestedWords words = builder.build(); final boolean isAutoCorrection = false; @@ -1769,6 +1770,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // getSuggestedWordBuilder handles gracefully a null value of prevWord final SuggestedWords.Builder builder = mSuggest.getSuggestedWordBuilder(mWordComposer, prevWord, mKeyboardSwitcher.getKeyboard().getProximityInfo(), mCorrectionMode); + final SuggestedWords suggestions = builder.build(); // Basically, we update the suggestion strip only when suggestion count > 1. However, // there is an exception: We update the suggestion strip whenever typed word's length @@ -1776,9 +1778,10 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // in most cases, suggestion count is 1 when typed word's length is 1, but we do always // need to clear the previous state when the user starts typing a word (i.e. typed word's // length == 1). - if (builder.size() > 1 || typedWord.length() == 1 || !builder.allowsToBeAutoCorrected() + if (suggestions.size() > 1 || typedWord.length() == 1 + || !suggestions.mAllowsToBeAutoCorrected || mSuggestionsView.isShowingAddToDictionaryHint()) { - showSuggestions(builder.build(), typedWord); + showSuggestions(suggestions, typedWord); } else { SuggestedWords previousSuggestions = mSuggestionsView.getSuggestions(); if (previousSuggestions == mSettingsValues.mSuggestPuncList) { @@ -1792,7 +1795,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar false /* typedWordValid */, false /* hasMinimalSuggestion */, false /* allowsToBeAutoCorrected */, - false /* isPunctuationSuggestions */); + false /* isPunctuationSuggestions */, + false /* shouldBlockAutoCorrectionBySafetyNet */); showSuggestions(obsoleteSuggestionsBuilder.build(), typedWord); } } |