aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Suggest.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Suggest.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Suggest.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 28cbc9789..28d3b4437 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -271,6 +271,8 @@ public class Suggest implements Dictionary.WordCallback {
return new SuggestedWords.Builder(
SuggestedWords.Builder.getFromCharSequenceList(mSuggestions),
+ false /* typedWordValid */,
+ false /* hasMinimalSuggestion */,
false /* allowsToBeAutoCorrected */,
false /* isPunctuationSuggestions */);
}
@@ -435,10 +437,11 @@ public class Suggest implements Dictionary.WordCallback {
}
// Don't auto-correct words with multiple capital letter
autoCorrectionAvailable &= !wordComposer.isMostlyCaps();
- builder = new SuggestedWords.Builder(scoreInfoList, allowsToBeAutoCorrected,
+ builder = new SuggestedWords.Builder(scoreInfoList,
+ !allowsToBeAutoCorrected /* typedWordValid */,
+ autoCorrectionAvailable /* hasMinimalSuggestion */,
+ allowsToBeAutoCorrected /* allowsToBeAutoCorrected */,
false /* isPunctuationSuggestions */);
- builder.setTypedWordValid(!allowsToBeAutoCorrected).setHasMinimalSuggestion(
- autoCorrectionAvailable);
if (allowsToBeAutoCorrected && builder.size() > 1 && mAutoCorrectionThreshold > 0
&& Suggest.shouldBlockAutoCorrectionBySafetyNet(typedWord, builder.getWord(1))) {
builder.setShouldBlockAutoCorrectionBySafetyNet();