Merge "[IL92] Straighten out showSuggestionStripWithTypedWord"
This commit is contained in:
commit
cbf54dea49
1 changed files with 2 additions and 7 deletions
|
@ -1426,7 +1426,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
private void showSuggestionStripWithTypedWord(final SuggestedWords sourceSuggestedWords,
|
private void showSuggestionStripWithTypedWord(final SuggestedWords sourceSuggestedWords,
|
||||||
final String typedWord) {
|
final String typedWord) {
|
||||||
// TODO: refactor this
|
|
||||||
final SuggestedWords suggestedWords =
|
final SuggestedWords suggestedWords =
|
||||||
sourceSuggestedWords.isEmpty() ? SuggestedWords.EMPTY : sourceSuggestedWords;
|
sourceSuggestedWords.isEmpty() ? SuggestedWords.EMPTY : sourceSuggestedWords;
|
||||||
final String autoCorrection;
|
final String autoCorrection;
|
||||||
|
@ -1437,13 +1436,9 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
// because it may differ from mWordComposer.mTypedWord.
|
// because it may differ from mWordComposer.mTypedWord.
|
||||||
autoCorrection = typedWord;
|
autoCorrection = typedWord;
|
||||||
}
|
}
|
||||||
if (suggestedWords.isEmpty()) {
|
if (SuggestedWords.EMPTY != suggestedWords) {
|
||||||
AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords, typedWord);
|
|
||||||
setSuggestedWords(suggestedWords);
|
|
||||||
setAutoCorrectionIndicator(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
|
mInputLogic.mWordComposer.setAutoCorrection(autoCorrection);
|
||||||
|
}
|
||||||
setSuggestedWords(suggestedWords);
|
setSuggestedWords(suggestedWords);
|
||||||
setAutoCorrectionIndicator(suggestedWords.mWillAutoCorrect);
|
setAutoCorrectionIndicator(suggestedWords.mWillAutoCorrect);
|
||||||
setSuggestionStripShown(isSuggestionsStripVisible());
|
setSuggestionStripShown(isSuggestionsStripVisible());
|
||||||
|
|
Loading…
Reference in a new issue