am 5b9e54c1: Merge "[IL88] Simple refactoring"
* commit '5b9e54c135cb1fa2ca1a5b5967a7934b789a8ed4': [IL88] Simple refactoringmain
commit
2a36d9bf3b
|
@ -158,7 +158,7 @@ public final class AccessibilityUtils {
|
||||||
* @param typedWord the currently typed word
|
* @param typedWord the currently typed word
|
||||||
*/
|
*/
|
||||||
public void setAutoCorrection(final SuggestedWords suggestedWords, final String typedWord) {
|
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);
|
mAutoCorrectionWord = suggestedWords.getWord(SuggestedWords.INDEX_OF_AUTO_CORRECTION);
|
||||||
mTypedWord = typedWord;
|
mTypedWord = typedWord;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1434,7 +1434,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
final String typedWord) {
|
final String typedWord) {
|
||||||
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(null, null);
|
AccessibilityUtils.getInstance().setAutoCorrection(SuggestedWords.EMPTY, typedWord);
|
||||||
clearSuggestionStrip();
|
clearSuggestionStrip();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue