aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-11-05 09:57:15 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-05 09:57:15 +0000
commit293bb7d0c0309a014e6617752300ee0df9eb6ec6 (patch)
tree04da98c5132f116e540b8fb0019fb50fa5134cbb /java
parentd63bf9b8656007bec400539ee576e2227fffc3cc (diff)
parentab68143ad0fb784db38a3fd65612632fca90c789 (diff)
downloadlatinime-293bb7d0c0309a014e6617752300ee0df9eb6ec6.tar.gz
latinime-293bb7d0c0309a014e6617752300ee0df9eb6ec6.tar.xz
latinime-293bb7d0c0309a014e6617752300ee0df9eb6ec6.zip
am ab68143a: Fix a bug where LatinIME would recorrect with no input view
* commit 'ab68143ad0fb784db38a3fd65612632fca90c789': Fix a bug where LatinIME would recorrect with no input view
Diffstat (limited to 'java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index c86d2b849..dc665471d 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1077,11 +1077,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
+ ", cs=" + composingSpanStart + ", ce=" + composingSpanEnd);
}
- // This call happens when we have a hardware keyboard as well as when we don't. While we
- // don't support hardware keyboards yet we should avoid doing the processing associated
- // with cursor movement when we have a hardware keyboard since we are not in charge.
+ // This call happens whether our view is displayed or not, but if it's not then we should
+ // not attempt recorrection. This is true even with a hardware keyboard connected: if the
+ // view is not displayed we have no means of showing suggestions anyway, and if it is then
+ // we want to show suggestions anyway.
final SettingsValues settingsValues = mSettings.getCurrent();
- if ((!settingsValues.mHasHardwareKeyboard || ProductionFlags.IS_HARDWARE_KEYBOARD_SUPPORTED)
+ if (isInputViewShown()
&& mInputLogic.onUpdateSelection(oldSelStart, oldSelEnd, newSelStart, newSelEnd,
settingsValues)) {
mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(),