Have empty suggestions go through setNeutralSuggestions.

Bug: 12865205
Change-Id: If17a390c445d0820325a9b16cc4f2f27a361187a
This commit is contained in:
Jean Chalard 2014-02-03 15:03:41 +09:00
parent 4e6f72cb80
commit 2cbf152986

View File

@ -1401,10 +1401,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// because it may differ from mWordComposer.mTypedWord.
autoCorrection = sourceSuggestedWords.mTypedWord;
}
if (SuggestedWords.EMPTY != suggestedWords) {
if (SuggestedWords.EMPTY == suggestedWords) {
setNeutralSuggestionStrip();
} else {
mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
setSuggestedWords(suggestedWords, isSuggestionsStripVisible());
}
setSuggestedWords(suggestedWords, isSuggestionsStripVisible());
// Cache the auto-correction in accessibility code so we can speak it if the user
// touches a key that will insert it.
AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords,