diff options
author | 2014-01-24 14:03:08 +0900 | |
---|---|---|
committer | 2014-01-27 18:42:29 +0900 | |
commit | f59487379e8d4153fb3a6bcd7e8aaa383454e7f2 (patch) | |
tree | 98087ec83313235367115be3cefa5a77f18d2b7d /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 10460441db805e78c3384cdba4fe011996221534 (diff) | |
download | latinime-f59487379e8d4153fb3a6bcd7e8aaa383454e7f2.tar.gz latinime-f59487379e8d4153fb3a6bcd7e8aaa383454e7f2.tar.xz latinime-f59487379e8d4153fb3a6bcd7e8aaa383454e7f2.zip |
[IL79] Some refactoring
Bug: 8636060
Change-Id: I931c553f68a1f15d22711a661dbffd4e5d421979
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(); } |