aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java18
1 files changed, 14 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index dc5bd2efc..2bbda7848 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -72,6 +72,7 @@ import com.android.inputmethod.latin.suggestions.SuggestionsView;
import java.io.FileDescriptor;
import java.io.PrintWriter;
+import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
@@ -925,8 +926,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
final List<SuggestedWords.SuggestedWordInfo> applicationSuggestedWords =
SuggestedWords.Builder.getFromApplicationSpecifiedCompletions(
applicationSpecifiedCompletions);
- SuggestedWords.Builder builder = new SuggestedWords.Builder()
- .addWords(applicationSuggestedWords)
+ SuggestedWords.Builder builder = new SuggestedWords.Builder(applicationSuggestedWords,
+ false /* allowsToBeAutoCorrected */,
+ false /* isPunctuationSuggestions */)
.setTypedWordValid(false)
.setHasMinimalSuggestion(false);
// When in fullscreen mode, show completions generated by the application
@@ -1782,8 +1784,16 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
if (previousSuggestions == mSettingsValues.mSuggestPuncList) {
previousSuggestions = SuggestedWords.EMPTY;
}
- final SuggestedWords.Builder obsoleteSuggestionsBuilder = new SuggestedWords.Builder()
- .addTypedWordAndPreviousSuggestions(typedWord, previousSuggestions);
+ final ArrayList<SuggestedWords.SuggestedWordInfo> typedWordAndPreviousSuggestions =
+ SuggestedWords.Builder.getTypedWordAndPreviousSuggestions(
+ typedWord, previousSuggestions);
+ final SuggestedWords.Builder obsoleteSuggestionsBuilder =
+ new SuggestedWords.Builder(typedWordAndPreviousSuggestions,
+ false /* allowsToBeAutoCorrected */,
+ false /* isPunctuationSuggestions */)
+ .setTypedWordValid(false)
+ .setHasMinimalSuggestion(false);
+
showSuggestions(obsoleteSuggestionsBuilder.build(), typedWord);
}
}