Skip to content
Snippets Groups Projects
Commit 01893b25 authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "[IL90] Small refactoring"

parents 3f226af4 d38b0468
No related branches found
No related tags found
No related merge requests found
...@@ -1424,13 +1424,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen ...@@ -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;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment