From ec471c72f8da3aba9a2c57512e440a6f28fa7d9a Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Tue, 13 Mar 2012 20:16:18 +0900 Subject: Add to SuggestedWords a missing parameter, and use it. Also stop using Builder between its creation and the call to the #build() method. Change-Id: Ie1fc3ec7b6f4c7c3789f672f4e26b4bf58c3e062 --- .../com/android/inputmethod/latin/SuggestedWords.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/SuggestedWords.java') diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index 144e67482..feb26db5a 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -25,21 +25,25 @@ import java.util.List; public class SuggestedWords { public static final SuggestedWords EMPTY = new SuggestedWords(false, false, false, false, - Collections.emptyList()); + false, Collections.emptyList()); public final boolean mTypedWordValid; public final boolean mHasAutoCorrectionCandidate; public final boolean mIsPunctuationSuggestions; + public final boolean mAllowsToBeAutoCorrected; private final List mSuggestedWordInfoList; - SuggestedWords(boolean typedWordValid, - boolean hasAutoCorrectionCandidate, boolean isPunctuationSuggestions, - boolean shouldBlockAutoCorrectionBySafetyNet, - List suggestedWordInfoList) { + SuggestedWords(final boolean typedWordValid, + final boolean hasAutoCorrectionCandidate, + final boolean isPunctuationSuggestions, + final boolean shouldBlockAutoCorrectionBySafetyNet, + final boolean allowsToBeAutoCorrected, + final List suggestedWordInfoList) { mTypedWordValid = typedWordValid; mHasAutoCorrectionCandidate = hasAutoCorrectionCandidate && !shouldBlockAutoCorrectionBySafetyNet; mIsPunctuationSuggestions = isPunctuationSuggestions; + mAllowsToBeAutoCorrected = allowsToBeAutoCorrected; mSuggestedWordInfoList = suggestedWordInfoList; } @@ -138,7 +142,7 @@ public class SuggestedWords { public SuggestedWords build() { return new SuggestedWords(mTypedWordValid, mHasMinimalSuggestion, mIsPunctuationSuggestions, mShouldBlockAutoCorrectionBySafetyNet, - mSuggestedWordInfoList); + mAllowsToBeAutoCorrected, mSuggestedWordInfoList); } public int size() { -- cgit v1.2.3-83-g751a