Merge "[IL88] Simple refactoring"

This commit is contained in:
Jean Chalard 2014-01-27 11:17:54 +00:00 committed by Android (Google) Code Review
commit 5b9e54c135
2 changed files with 2 additions and 2 deletions

View file

@ -158,7 +158,7 @@ public final class AccessibilityUtils {
* @param typedWord the currently typed word
*/
public void setAutoCorrection(final SuggestedWords suggestedWords, final String typedWord) {
if (suggestedWords != null && suggestedWords.mWillAutoCorrect) {
if (suggestedWords.mWillAutoCorrect) {
mAutoCorrectionWord = suggestedWords.getWord(SuggestedWords.INDEX_OF_AUTO_CORRECTION);
mTypedWord = typedWord;
} else {

View file

@ -1434,7 +1434,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final String typedWord) {
if (suggestedWords.isEmpty()) {
// No auto-correction is available, clear the cached values.
AccessibilityUtils.getInstance().setAutoCorrection(null, null);
AccessibilityUtils.getInstance().setAutoCorrection(SuggestedWords.EMPTY, typedWord);
clearSuggestionStrip();
return;
}