From 6686e63f2158eff07e39ff002ba211d0578f2a4f Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 17 Oct 2012 05:21:52 +0900 Subject: [PATCH] Honor automatic shift turned off for gestures Bug: 7354129 Change-Id: Ia02336e8cea2f04b629edbe74b7815cce0d7fad6 --- .../com/android/inputmethod/keyboard/KeyboardSwitcher.java | 4 +++- java/src/com/android/inputmethod/latin/LatinIME.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index e99e956e2..38025e8e4 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -389,7 +389,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { } } - public int getManualCapsMode() { + public int getKeyboardShiftMode() { final Keyboard keyboard = getKeyboard(); if (keyboard == null) { return WordComposer.CAPS_MODE_OFF; @@ -400,6 +400,8 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { return WordComposer.CAPS_MODE_MANUAL_SHIFT_LOCKED; case KeyboardId.ELEMENT_ALPHABET_MANUAL_SHIFTED: return WordComposer.CAPS_MODE_MANUAL_SHIFTED; + case KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED: + return WordComposer.CAPS_MODE_AUTO_SHIFTED; default: return WordComposer.CAPS_MODE_OFF; } diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index d98966e96..cd20ba3a3 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1119,8 +1119,8 @@ public final class LatinIME extends InputMethodService implements KeyboardAction // Factor in auto-caps and manual caps and compute the current caps mode. private int getActualCapsMode() { - final int manual = mKeyboardSwitcher.getManualCapsMode(); - if (manual != WordComposer.CAPS_MODE_OFF) return manual; + final int keyboardShiftMode = mKeyboardSwitcher.getKeyboardShiftMode(); + if (keyboardShiftMode != WordComposer.CAPS_MODE_AUTO_SHIFTED) return keyboardShiftMode; final int auto = getCurrentAutoCapsState(); if (0 != (auto & TextUtils.CAP_MODE_CHARACTERS)) { return WordComposer.CAPS_MODE_AUTO_SHIFT_LOCKED;