aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/SuggestedWords.java
diff options
context:
space:
mode:
authorAdrian Velicu <adrianv@google.com>2014-09-22 06:25:46 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-22 06:25:46 +0000
commitc096f715feb53571845d5aefc6bef840274ded89 (patch)
tree8adbc6203b5ad89a994af2b6bab2b67a735115b2 /java/src/com/android/inputmethod/latin/SuggestedWords.java
parent42852d3b6e9ef5008f1e52d0980c21e94ff87814 (diff)
parentb12c174c2f04461e5c5e0d2e148742ef0bfc5594 (diff)
downloadlatinime-c096f715feb53571845d5aefc6bef840274ded89.tar.gz
latinime-c096f715feb53571845d5aefc6bef840274ded89.tar.xz
latinime-c096f715feb53571845d5aefc6bef840274ded89.zip
am b12c174c: Merge "Hiding SuggestedWords.EMPTY and refactoring code that compares SuggestedWords instances directly to it to use isEmpty instead"
* commit 'b12c174c2f04461e5c5e0d2e148742ef0bfc5594': 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.java6
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(