diff options
author | 2014-09-22 06:20:24 +0000 | |
---|---|---|
committer | 2014-09-22 06:20:25 +0000 | |
commit | b12c174c2f04461e5c5e0d2e148742ef0bfc5594 (patch) | |
tree | c68901979a6d86d5e8a81623120b57ffe014c75a /java/src/com/android/inputmethod/latin/SuggestedWords.java | |
parent | b51412a05c28fa51828e07224b7fe49a424d8fc5 (diff) | |
parent | 30f4a2a4d750dc8c3132d706d9148daf71fbd168 (diff) | |
download | latinime-b12c174c2f04461e5c5e0d2e148742ef0bfc5594.tar.gz latinime-b12c174c2f04461e5c5e0d2e148742ef0bfc5594.tar.xz latinime-b12c174c2f04461e5c5e0d2e148742ef0bfc5594.zip |
Merge "Hiding SuggestedWords.EMPTY and refactoring code that compares SuggestedWords instances directly to it to use isEmpty instead"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/SuggestedWords.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SuggestedWords.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index 3eefafc1f..e6fd43a07 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -45,7 +45,7 @@ public class SuggestedWords { public static final int MAX_SUGGESTIONS = 18; private static final ArrayList<SuggestedWordInfo> EMPTY_WORD_INFO_LIST = new ArrayList<>(0); - public static final SuggestedWords EMPTY = new SuggestedWords( + private static final SuggestedWords EMPTY = new SuggestedWords( EMPTY_WORD_INFO_LIST, null /* rawSuggestions */, false /* typedWordValid */, false /* willAutoCorrect */, false /* isObsoleteSuggestions */, INPUT_STYLE_NONE); @@ -196,6 +196,10 @@ public class SuggestedWords { return result; } + public static final SuggestedWords getEmptyInstance() { + return SuggestedWords.EMPTY; + } + // 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( |