Merge "Keep previous suggestions when there is only one suggestion found"

main
Tadashi G. Takaoka 2010-12-10 03:54:02 -08:00 committed by Android (Google) Code Review
commit ffb864a768
1 changed files with 3 additions and 0 deletions

View File

@ -184,6 +184,9 @@ public class CandidateView extends LinearLayout implements OnClickListener, OnLo
public void setSuggestions(List<CharSequence> suggestions, boolean completions, public void setSuggestions(List<CharSequence> suggestions, boolean completions,
boolean typedWordValid, boolean haveMinimalSuggestion) { boolean typedWordValid, boolean haveMinimalSuggestion) {
// Don't update suggestions when there is zero or only one suggestion found.
if (suggestions != null && suggestions.size() <= 1)
return;
if (mShowingAutoCorrectionInverted) { if (mShowingAutoCorrectionInverted) {
mHandler.postUpdateSuggestions(suggestions, completions, typedWordValid, mHandler.postUpdateSuggestions(suggestions, completions, typedWordValid,
haveMinimalSuggestion); haveMinimalSuggestion);