[IL90] Small refactoring
Bug: 8636060 Change-Id: I37844ab1c5c61ea940897e7d72bb79c7b329f743
This commit is contained in:
parent
33ff321d6c
commit
d38b0468b0
1 changed files with 5 additions and 3 deletions
|
@ -1424,13 +1424,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showSuggestionStripWithTypedWord(final SuggestedWords suggestedWords,
|
private void showSuggestionStripWithTypedWord(final SuggestedWords sourceSuggestedWords,
|
||||||
final String typedWord) {
|
final String typedWord) {
|
||||||
// TODO: refactor this
|
// TODO: refactor this
|
||||||
|
final SuggestedWords suggestedWords =
|
||||||
|
sourceSuggestedWords.isEmpty() ? SuggestedWords.EMPTY : sourceSuggestedWords;
|
||||||
if (suggestedWords.isEmpty()) {
|
if (suggestedWords.isEmpty()) {
|
||||||
// No auto-correction is available, clear the cached values.
|
// No auto-correction is available, clear the cached values.
|
||||||
AccessibilityUtils.getInstance().setAutoCorrection(SuggestedWords.EMPTY, typedWord);
|
AccessibilityUtils.getInstance().setAutoCorrection(suggestedWords, typedWord);
|
||||||
setSuggestedWords(SuggestedWords.EMPTY);
|
setSuggestedWords(suggestedWords);
|
||||||
setAutoCorrectionIndicator(false);
|
setAutoCorrectionIndicator(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue