aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-10-07 08:34:52 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-07 08:34:52 +0000
commit7da62bbe24e86ba95cab95cb5f10023ea07c08c5 (patch)
tree656992fa0c9a0331015ee60b5d3341355fb4e9a1 /java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
parent4746217247d14f26249217aab28215e9c6867614 (diff)
parentdf33982fce6312203ed7446926f31ed92a8ae1ca (diff)
downloadlatinime-7da62bbe24e86ba95cab95cb5f10023ea07c08c5.tar.gz
latinime-7da62bbe24e86ba95cab95cb5f10023ea07c08c5.tar.xz
latinime-7da62bbe24e86ba95cab95cb5f10023ea07c08c5.zip
Merge "Remove suggestions when string contains a period"
Diffstat (limited to 'java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java')
-rw-r--r--java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
index eb6d7c106..503b18b1b 100644
--- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
+++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
@@ -204,10 +204,20 @@ public final class AndroidSpellCheckerService extends SpellCheckerService
return AndroidSpellCheckerSessionFactory.newInstance(this);
}
- public static SuggestionsInfo getNotInDictEmptySuggestions() {
- return new SuggestionsInfo(0, EMPTY_STRING_ARRAY);
+ /**
+ * Returns an empty SuggestionsInfo with flags signaling the word is not in the dictionary.
+ * @param reportAsTypo whether this should include the flag LOOKS_LIKE_TYPO, for red underline.
+ * @return the empty SuggestionsInfo with the appropriate flags set.
+ */
+ public static SuggestionsInfo getNotInDictEmptySuggestions(final boolean reportAsTypo) {
+ return new SuggestionsInfo(reportAsTypo ? SuggestionsInfo.RESULT_ATTR_LOOKS_LIKE_TYPO : 0,
+ EMPTY_STRING_ARRAY);
}
+ /**
+ * Returns an empty suggestionInfo with flags signaling the word is in the dictionary.
+ * @return the empty SuggestionsInfo with the appropriate flags set.
+ */
public static SuggestionsInfo getInDictEmptySuggestions() {
return new SuggestionsInfo(SuggestionsInfo.RESULT_ATTR_IN_THE_DICTIONARY,
EMPTY_STRING_ARRAY);