diff options
author | 2013-12-27 17:04:12 +0900 | |
---|---|---|
committer | 2014-01-23 13:09:58 +0900 | |
commit | ab80b41a0dee298837b1358457768ee5ac0fc79e (patch) | |
tree | a2a43d6370f08fc785750af0b524486bda4869de /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | a91dfff5e54f68c4003327eeca47286084c35a2f (diff) | |
download | latinime-ab80b41a0dee298837b1358457768ee5ac0fc79e.tar.gz latinime-ab80b41a0dee298837b1358457768ee5ac0fc79e.tar.xz latinime-ab80b41a0dee298837b1358457768ee5ac0fc79e.zip |
[IL66] Remove two accesses to KeyboardSwitcher.
Bug: 8636060
Change-Id: I3b144993e2bcd552f9b292b8f057c9db4216125c
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index aca361905..399d4917c 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -217,10 +217,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen (SuggestedWords) msg.obj, latinIme.mKeyboardSwitcher); break; case MSG_RESET_CACHES: - latinIme.mInputLogic.retryResetCaches(latinIme.mSettings.getCurrent(), + final SettingsValues settingsValues = latinIme.mSettings.getCurrent(); + if (latinIme.mInputLogic.retryResetCachesAndReturnSuccess(settingsValues, msg.arg1 == 1 /* tryResumeSuggestions */, - msg.arg2 /* remainingTries */, - latinIme.mKeyboardSwitcher, this); + msg.arg2 /* remainingTries */, this /* handler */)) { + // If we were able to reset the caches, then we can reload the keyboard. + // Otherwise, we'll do it when we can. + latinIme.mKeyboardSwitcher.loadKeyboard(latinIme.getCurrentInputEditorInfo(), + settingsValues); + } break; } } @@ -1257,6 +1262,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen final int keyY = mainKeyboardView.getKeyY(y); mInputLogic.onCodeInput(codePoint, keyX, keyY, mHandler, mKeyboardSwitcher, mSubtypeSwitcher); + mKeyboardSwitcher.onCodeInput(codePoint); } // Called from PointerTracker through the KeyboardActionListener interface |