Keep previous suggestions when there is only one suggestion found
Bug: 1647861 Change-Id: I7aa7ceeb93b5d8db69480d73cc8a7177ab6bbb42main
parent
e26ef1bccd
commit
a15e45ef45
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue