aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/SuggestedWords.java
diff options
context:
space:
mode:
authorAdrian Velicu <adrianv@google.com>2014-09-22 12:40:41 +0900
committerAdrian Velicu <adrianv@google.com>2014-09-22 14:50:21 +0900
commit30f4a2a4d750dc8c3132d706d9148daf71fbd168 (patch)
tree5027a3f24e8501064d5ccec88093b1082997468a /java/src/com/android/inputmethod/latin/SuggestedWords.java
parent1c810c6725e860a625e9eb403d0a81e8a64e6d62 (diff)
downloadlatinime-30f4a2a4d750dc8c3132d706d9148daf71fbd168.tar.gz
latinime-30f4a2a4d750dc8c3132d706d9148daf71fbd168.tar.xz
latinime-30f4a2a4d750dc8c3132d706d9148daf71fbd168.zip
Hiding SuggestedWords.EMPTY and refactoring code that compares SuggestedWords instances directly to it to use isEmpty instead
Bug: 17560717 Change-Id: I7032bf0ab46f9cf5e3b3312a14e689b5496764c1
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(