@@ -185,18 +185,16 @@ public void onGetSuggestions(SuggestionsInfo[] results) {
185185
186186 if (!isInDictionary && looksLikeTypo ) {
187187 String [] suggestions = getSuggestions (suggestionsInfo );
188- if (suggestions .length > 0 ) {
189- SuggestionSpan suggestionSpan = new SuggestionSpan (
190- mTextView .getContext (), suggestions ,
191- SuggestionSpan .FLAG_EASY_CORRECT |
192- SuggestionSpan .FLAG_MISSPELLED );
193- final int start = editable .getSpanStart (spellCheckSpan );
194- final int end = editable .getSpanEnd (spellCheckSpan );
195- editable .setSpan (suggestionSpan , start , end ,
196- Spanned .SPAN_EXCLUSIVE_EXCLUSIVE );
197- // TODO limit to the word rectangle region
198- mTextView .invalidate ();
199- }
188+ SuggestionSpan suggestionSpan = new SuggestionSpan (
189+ mTextView .getContext (), suggestions ,
190+ SuggestionSpan .FLAG_EASY_CORRECT |
191+ SuggestionSpan .FLAG_MISSPELLED );
192+ final int start = editable .getSpanStart (spellCheckSpan );
193+ final int end = editable .getSpanEnd (spellCheckSpan );
194+ editable .setSpan (suggestionSpan , start , end ,
195+ Spanned .SPAN_EXCLUSIVE_EXCLUSIVE );
196+ // TODO limit to the word rectangle region
197+ mTextView .invalidate ();
200198 }
201199 editable .removeSpan (spellCheckSpan );
202200 }
0 commit comments