Merge "Have empty suggestions go through setNeutralSuggestions."

This commit is contained in:
Jean Chalard 2014-02-03 06:45:44 +00:00 committed by Android (Google) Code Review
commit 5d9be8039c

View File

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