[IL39] Change a test.

I don't see why we would want to remove other suggestions just because
the only suggestion happens to be a dictionary word. That's just
inconsistent.

Bug: 8636060
Change-Id: Ie2d990e5785273d625e6e5518026364165a8f2df
This commit is contained in:
Jean Chalard 2013-12-24 22:41:17 +09:00
parent 98140faac3
commit 5c45ff1214

View file

@ -1579,12 +1579,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// TODO: consolidate this into getSuggestedWords // TODO: consolidate this into getSuggestedWords
// We update the suggestion strip only when we have some suggestions to show, i.e. when // We update the suggestion strip only when we have some suggestions to show, i.e. when
// the suggestion count is > 1; else, we leave the old suggestions, with the typed word // the suggestion count is > 1; else, we leave the old suggestions, with the typed word
// replaced with the new one. However, when the word is a dictionary word, or when the // replaced with the new one. However, when the length of the typed word is 1 or 0 (after
// length of the typed word is 1 or 0 (after a deletion typically), we do want to remove the // a deletion typically), we do want to remove the old suggestions. Also, if we are showing
// old suggestions. Also, if we are showing the "add to dictionary" hint, we need to // the "add to dictionary" hint, we need to revert to suggestions - although it is unclear
// revert to suggestions - although it is unclear how we can come here if it's displayed. // how we can come here if it's displayed.
if (suggestedWords.size() > 1 || typedWord.length() <= 1 if (suggestedWords.size() > 1 || typedWord.length() <= 1
|| suggestedWords.mTypedWordValid || null == mSuggestionStripView || null == mSuggestionStripView
|| mSuggestionStripView.isShowingAddToDictionaryHint()) { || mSuggestionStripView.isShowingAddToDictionaryHint()) {
return suggestedWords; return suggestedWords;
} else { } else {