mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
[IL88] Simple refactoring
With this, the value passed to suggestedWords is never null. Bug: 8636060 Change-Id: I433dd7e7290125e217e05cc20bee7a4b58fe083f
This commit is contained in:
parent
d90bdd2187
commit
ca819178a1
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user