diff options
author | 2014-11-07 17:10:36 +0900 | |
---|---|---|
committer | 2014-11-17 16:23:52 +0900 | |
commit | 83f9524b8796d94fad56280f6b26c9045fea313f (patch) | |
tree | 05ac6bebdd38eb4a85973648b1f51d3f46f1ae84 /java/src/com/android/inputmethod/latin/SuggestedWords.java | |
parent | e7a72de8c28662e7a7855528d80c6a22a15fbcde (diff) | |
download | latinime-83f9524b8796d94fad56280f6b26c9045fea313f.tar.gz latinime-83f9524b8796d94fad56280f6b26c9045fea313f.tar.xz latinime-83f9524b8796d94fad56280f6b26c9045fea313f.zip |
Remove the other deprecated constructor to SuggestedWords
Change-Id: Ied821df01e032ebc913d2f15dffdf41a51372ea4
Diffstat (limited to 'java/src/com/android/inputmethod/latin/SuggestedWords.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SuggestedWords.java | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index bddeac495..02b2d56e7 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -50,8 +50,9 @@ public class SuggestedWords { private static final ArrayList<SuggestedWordInfo> EMPTY_WORD_INFO_LIST = new ArrayList<>(0); @Nonnull private static final SuggestedWords EMPTY = new SuggestedWords( - EMPTY_WORD_INFO_LIST, null /* rawSuggestions */, false /* typedWordValid */, - false /* willAutoCorrect */, false /* isObsoleteSuggestions */, INPUT_STYLE_NONE); + EMPTY_WORD_INFO_LIST, null /* rawSuggestions */, null /* typedWord */, + false /* typedWordValid */, false /* willAutoCorrect */, + false /* isObsoleteSuggestions */, INPUT_STYLE_NONE, NOT_A_SEQUENCE_NUMBER); public final String mTypedWord; public final boolean mTypedWordValid; @@ -69,19 +70,6 @@ public class SuggestedWords { public SuggestedWords(final ArrayList<SuggestedWordInfo> suggestedWordInfoList, final ArrayList<SuggestedWordInfo> rawSuggestions, - final boolean typedWordValid, - final boolean willAutoCorrect, - final boolean isObsoleteSuggestions, - final int inputStyle) { - this(suggestedWordInfoList, rawSuggestions, - (suggestedWordInfoList.isEmpty() || isPrediction(inputStyle)) ? null - : suggestedWordInfoList.get(INDEX_OF_TYPED_WORD).mWord, - typedWordValid, willAutoCorrect, - isObsoleteSuggestions, inputStyle, NOT_A_SEQUENCE_NUMBER); - } - - public SuggestedWords(final ArrayList<SuggestedWordInfo> suggestedWordInfoList, - final ArrayList<SuggestedWordInfo> rawSuggestions, final String typedWord, final boolean typedWordValid, final boolean willAutoCorrect, @@ -423,8 +411,10 @@ public class SuggestedWords { info.mSourceDict, SuggestedWordInfo.NOT_AN_INDEX, SuggestedWordInfo.NOT_A_CONFIDENCE)); } - return new SuggestedWords(newSuggestions, null /* rawSuggestions */, mTypedWordValid, - mWillAutoCorrect, mIsObsoleteSuggestions, INPUT_STYLE_TAIL_BATCH); + return new SuggestedWords(newSuggestions, null /* rawSuggestions */, + newSuggestions.isEmpty() ? null : newSuggestions.get(0).mWord /* typedWord */, + mTypedWordValid, mWillAutoCorrect, mIsObsoleteSuggestions, INPUT_STYLE_TAIL_BATCH, + NOT_A_SEQUENCE_NUMBER); } /** |