diff options
Diffstat (limited to 'java/src/com/android/inputmethod/latin/SuggestedWords.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SuggestedWords.java | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index 676563e1d..d41f84798 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -75,13 +75,17 @@ public class SuggestedWords { public static class Builder { private boolean mTypedWordValid; private boolean mHasMinimalSuggestion; - private boolean mIsPunctuationSuggestions; + private final boolean mIsPunctuationSuggestions; private boolean mShouldBlockAutoCorrectionBySafetyNet; - private boolean mAllowsToBeAutoCorrected; + private final boolean mAllowsToBeAutoCorrected; private final List<SuggestedWordInfo> mSuggestedWordInfoList; - public Builder(final List<SuggestedWordInfo> suggestedWordInfoList) { + public Builder(final List<SuggestedWordInfo> suggestedWordInfoList, + final boolean allowsToBeAutoCorrected, + final boolean isPunctuationSuggestions) { mSuggestedWordInfoList = suggestedWordInfoList; + mAllowsToBeAutoCorrected = allowsToBeAutoCorrected; + mIsPunctuationSuggestions = isPunctuationSuggestions; } public static List<SuggestedWordInfo> getFromCharSequenceList( @@ -112,21 +116,11 @@ public class SuggestedWords { return this; } - public Builder setIsPunctuationSuggestions() { - mIsPunctuationSuggestions = true; - return this; - } - public Builder setShouldBlockAutoCorrectionBySafetyNet() { mShouldBlockAutoCorrectionBySafetyNet = true; return this; } - public Builder setAllowsToBeAutoCorrected(final boolean allowsToBeAutoCorrected) { - mAllowsToBeAutoCorrected = allowsToBeAutoCorrected; - return this; - } - // Should get rid of the first one (what the user typed previously) from suggestions // and replace it with what the user currently typed. public static ArrayList<SuggestedWordInfo> getTypedWordAndPreviousSuggestions( |