diff options
author | 2012-03-13 20:16:18 +0900 | |
---|---|---|
committer | 2012-03-13 20:19:21 +0900 | |
commit | ec471c72f8da3aba9a2c57512e440a6f28fa7d9a (patch) | |
tree | 59cc8952da1cd4b302d0cab06718f0f6c15c4cda /java/src/com/android/inputmethod/latin/SuggestedWords.java | |
parent | 2e2519ee914d4bf9462950553840557a4c19faed (diff) | |
download | latinime-ec471c72f8da3aba9a2c57512e440a6f28fa7d9a.tar.gz latinime-ec471c72f8da3aba9a2c57512e440a6f28fa7d9a.tar.xz latinime-ec471c72f8da3aba9a2c57512e440a6f28fa7d9a.zip |
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
Diffstat (limited to 'java/src/com/android/inputmethod/latin/SuggestedWords.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SuggestedWords.java | 16 |
1 files changed, 10 insertions, 6 deletions
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.<SuggestedWordInfo>emptyList()); + false, Collections.<SuggestedWordInfo>emptyList()); public final boolean mTypedWordValid; public final boolean mHasAutoCorrectionCandidate; public final boolean mIsPunctuationSuggestions; + public final boolean mAllowsToBeAutoCorrected; private final List<SuggestedWordInfo> mSuggestedWordInfoList; - SuggestedWords(boolean typedWordValid, - boolean hasAutoCorrectionCandidate, boolean isPunctuationSuggestions, - boolean shouldBlockAutoCorrectionBySafetyNet, - List<SuggestedWordInfo> suggestedWordInfoList) { + SuggestedWords(final boolean typedWordValid, + final boolean hasAutoCorrectionCandidate, + final boolean isPunctuationSuggestions, + final boolean shouldBlockAutoCorrectionBySafetyNet, + final boolean allowsToBeAutoCorrected, + final List<SuggestedWordInfo> 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() { |