[IL98] Refactoring of setSuggestedWords
Bug: 8636060 Change-Id: Iab53df96f2c23bddc6c70c3560b380fbaef1053cmain
parent
eb00023b9b
commit
675f1dbaf0
|
@ -1325,11 +1325,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
// TODO[IL]: Define a clear interface for this
|
// TODO[IL]: Define a clear interface for this
|
||||||
public void setSuggestedWords(final SuggestedWords words, final boolean shouldShow) {
|
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;
|
mInputLogic.mSuggestedWords = words;
|
||||||
final boolean newAutoCorrectionIndicator = words.mWillAutoCorrect;
|
final boolean newAutoCorrectionIndicator = words.mWillAutoCorrect;
|
||||||
// Put a blue underline to a word in TextView which will be auto-corrected.
|
// Put a blue underline to a word in TextView which will be auto-corrected.
|
||||||
|
@ -1344,8 +1339,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
// the practice.
|
// the practice.
|
||||||
mInputLogic.mConnection.setComposingText(textWithUnderline, 1);
|
mInputLogic.mConnection.setComposingText(textWithUnderline, 1);
|
||||||
}
|
}
|
||||||
|
if (mSuggestionStripView != null) {
|
||||||
|
mSuggestionStripView.setSuggestions(
|
||||||
|
words, SubtypeLocaleUtils.isRtlLanguage(mSubtypeSwitcher.getCurrentSubtype()));
|
||||||
|
mKeyboardSwitcher.onAutoCorrectionStateChanged(words.mWillAutoCorrect);
|
||||||
setSuggestionStripShownInternal(shouldShow, true /* needsInputViewShown */);
|
setSuggestionStripShownInternal(shouldShow, true /* needsInputViewShown */);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO[IL]: Move this out of LatinIME.
|
// TODO[IL]: Move this out of LatinIME.
|
||||||
public void getSuggestedWords(final int sessionId, final int sequenceNumber,
|
public void getSuggestedWords(final int sessionId, final int sequenceNumber,
|
||||||
|
|
Loading…
Reference in New Issue