From 675f1dbaf0c9a2e01fe04c07ceb23f6b79721fd0 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Fri, 24 Jan 2014 21:50:46 +0900 Subject: [PATCH] [IL98] Refactoring of setSuggestedWords Bug: 8636060 Change-Id: Iab53df96f2c23bddc6c70c3560b380fbaef1053c --- java/src/com/android/inputmethod/latin/LatinIME.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index c1dfde888..adebfc08c 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -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.