diff options
author | 2014-01-27 02:02:42 -0800 | |
---|---|---|
committer | 2014-01-27 02:02:42 -0800 | |
commit | a8b37414f835c07441162b1b873228333a097bbd (patch) | |
tree | 2e5048bec97abe478a8e4af02158bd437271bba8 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | f58a96c977648cb720a748ad56be4001090f062a (diff) | |
parent | b084da2ae6622488779ddb3a66081610bfe96a66 (diff) | |
download | latinime-a8b37414f835c07441162b1b873228333a097bbd.tar.gz latinime-a8b37414f835c07441162b1b873228333a097bbd.tar.xz latinime-a8b37414f835c07441162b1b873228333a097bbd.zip |
am b084da2a: Merge changes I5092942a,I931c553f
* commit 'b084da2ae6622488779ddb3a66081610bfe96a66':
[IL80] Reverse a test for clarity.
[IL79] Some refactoring
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index ec14e9fea..e082735c8 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -912,8 +912,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen composingSpanEnd, mInputLogic.mConnection); } - if (mInputLogic.onUpdateSelection(mSettings.getCurrent(), oldSelStart, oldSelEnd, - newSelStart, newSelEnd, composingSpanStart, composingSpanEnd)) { + // If the keyboard is not visible, we don't need to do all the housekeeping work, as it + // will be reset when the keyboard shows up anyway. + // TODO: revisit this when LatinIME supports hardware keyboards. + // NOTE: the test harness subclasses LatinIME and overrides isInputViewShown(). + // TODO: find a better way to simulate actual execution. + if (isInputViewShown() && + mInputLogic.onUpdateSelection(mSettings.getCurrent(), oldSelStart, oldSelEnd, + newSelStart, newSelEnd, composingSpanStart, composingSpanEnd)) { mKeyboardSwitcher.updateShiftState(); } |