am 675f1dba: [IL98] Refactoring of setSuggestedWords

* commit '675f1dbaf0c9a2e01fe04c07ceb23f6b79721fd0':
  [IL98] Refactoring of setSuggestedWords
main
Jean Chalard 2014-01-28 00:24:31 -08:00 committed by Android Git Automerger
commit 6cf9d44119
1 changed files with 6 additions and 6 deletions

View File

@ -1325,11 +1325,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// TODO[IL]: Define a clear interface for this
public void setSuggestedWords(final SuggestedWords words, final boolean shouldShow) {
if (mSuggestionStripView != null) {
mSuggestionStripView.setSuggestions(
words, SubtypeLocaleUtils.isRtlLanguage(mSubtypeSwitcher.getCurrentSubtype()));
mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect);
}
mInputLogic.mSuggestedWords = words;
final boolean newAutoCorrectionIndicator = words.mWillAutoCorrect;
// Put a blue underline to a word in TextView which will be auto-corrected.
@ -1344,7 +1339,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// the practice.
mInputLogic.mConnection.setComposingText(textWithUnderline, 1);
}
setSuggestionStripShownInternal(shouldShow, true /* needsInputViewShown */);
if (mSuggestionStripView != null) {
mSuggestionStripView.setSuggestions(
words, SubtypeLocaleUtils.isRtlLanguage(mSubtypeSwitcher.getCurrentSubtype()));
mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect);
setSuggestionStripShownInternal(shouldShow, true /* needsInputViewShown */);
}
}
// TODO[IL]: Move this out of LatinIME.