diff options
author | 2013-10-09 21:26:04 -0700 | |
---|---|---|
committer | 2013-10-09 21:26:04 -0700 | |
commit | fe8d76b15ea1dcf6cde4527476a85007c56166bb (patch) | |
tree | b48985fc56b74cd381150c0b87734d3851185ce2 /java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java | |
parent | 746d53d815684cbe3c0e5a81d2842fd0a9539970 (diff) | |
parent | adc7bacfb713f0369e3629d72d96e299bfb703c6 (diff) | |
download | latinime-fe8d76b15ea1dcf6cde4527476a85007c56166bb.tar.gz latinime-fe8d76b15ea1dcf6cde4527476a85007c56166bb.tar.xz latinime-fe8d76b15ea1dcf6cde4527476a85007c56166bb.zip |
am adc7bacf: am dff82299: am 7da62bbe: Merge "Remove suggestions when string contains a period"
* commit 'adc7bacfb713f0369e3629d72d96e299bfb703c6':
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.java | 14 |
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); |