Merge "Don't report 1-char words as typos"

This commit is contained in:
Jean Chalard 2011-09-13 20:57:38 -07:00 committed by Android (Google) Code Review
commit 14c840fb27

View file

@ -293,7 +293,7 @@ public class AndroidSpellCheckerService extends SpellCheckerService {
final int suggestionsLimit) { final int suggestionsLimit) {
final String text = textInfo.getText(); final String text = textInfo.getText();
if (TextUtils.isEmpty(text)) return EMPTY_SUGGESTIONS_INFO; if (TextUtils.isEmpty(text) || text.length() <= 1) return EMPTY_SUGGESTIONS_INFO;
final SuggestionsGatherer suggestionsGatherer = final SuggestionsGatherer suggestionsGatherer =
new SuggestionsGatherer(suggestionsLimit); new SuggestionsGatherer(suggestionsLimit);