diff options
author | 2014-11-19 08:34:08 +0000 | |
---|---|---|
committer | 2014-11-19 08:34:08 +0000 | |
commit | 6cea754895872d208c8b6a3bc2f9c26d21746b33 (patch) | |
tree | 0cbbb7e16107500ff3a12172a7560fe70c1f5824 /java/src/com/android/inputmethod/latin/SuggestedWords.java | |
parent | 8833756d522e247f40b6824f642ee3f5a67e1086 (diff) | |
parent | fde0cce1037a635c34e55baa17424f8eff53b6da (diff) | |
download | latinime-6cea754895872d208c8b6a3bc2f9c26d21746b33.tar.gz latinime-6cea754895872d208c8b6a3bc2f9c26d21746b33.tar.xz latinime-6cea754895872d208c8b6a3bc2f9c26d21746b33.zip |
am fde0cce1: Merge "Remove the other deprecated constructor to SuggestedWords"
* commit 'fde0cce1037a635c34e55baa17424f8eff53b6da':
Remove the other deprecated constructor to SuggestedWords
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); } /** |