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, 6 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index d0f94bb6a..62ba8d952 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -926,16 +926,16 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar final List<SuggestedWords.SuggestedWordInfo> applicationSuggestedWords = SuggestedWords.getFromApplicationSpecifiedCompletions( applicationSpecifiedCompletions); - SuggestedWords.Builder builder = new SuggestedWords.Builder(applicationSuggestedWords, + final SuggestedWords suggestedWords = SuggestedWords.getSuggestedWords( + applicationSuggestedWords, false /* typedWordValid */, false /* hasMinimalSuggestion */, false /* allowsToBeAutoCorrected */, false /* isPunctuationSuggestions */, false /* shouldBlockAutoCorrectionBySafetyNet */); // When in fullscreen mode, show completions generated by the application - final SuggestedWords words = builder.build(); final boolean isAutoCorrection = false; - setSuggestions(words, isAutoCorrection); + setSuggestions(suggestedWords, isAutoCorrection); setAutoCorrectionIndicator(isAutoCorrection); // TODO: is this the right thing to do? What should we auto-correct to in // this case? This says to keep whatever the user typed. @@ -1789,14 +1789,14 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar final ArrayList<SuggestedWords.SuggestedWordInfo> typedWordAndPreviousSuggestions = SuggestedWords.getTypedWordAndPreviousSuggestions( typedWord, previousSuggestions); - final SuggestedWords.Builder obsoleteSuggestionsBuilder = - new SuggestedWords.Builder(typedWordAndPreviousSuggestions, + final SuggestedWords obsoleteSuggestedWords = + SuggestedWords.getSuggestedWords(typedWordAndPreviousSuggestions, false /* typedWordValid */, false /* hasMinimalSuggestion */, false /* allowsToBeAutoCorrected */, false /* isPunctuationSuggestions */, false /* shouldBlockAutoCorrectionBySafetyNet */); - showSuggestions(obsoleteSuggestionsBuilder.build(), typedWord); + showSuggestions(obsoleteSuggestedWords, typedWord); } } |