Honor automatic shift turned off for gestures
Bug: 7354129 Change-Id: Ia02336e8cea2f04b629edbe74b7815cce0d7fad6main
parent
c1bcb8ee10
commit
6686e63f21
|
@ -389,7 +389,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getManualCapsMode() {
|
public int getKeyboardShiftMode() {
|
||||||
final Keyboard keyboard = getKeyboard();
|
final Keyboard keyboard = getKeyboard();
|
||||||
if (keyboard == null) {
|
if (keyboard == null) {
|
||||||
return WordComposer.CAPS_MODE_OFF;
|
return WordComposer.CAPS_MODE_OFF;
|
||||||
|
@ -400,6 +400,8 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
return WordComposer.CAPS_MODE_MANUAL_SHIFT_LOCKED;
|
return WordComposer.CAPS_MODE_MANUAL_SHIFT_LOCKED;
|
||||||
case KeyboardId.ELEMENT_ALPHABET_MANUAL_SHIFTED:
|
case KeyboardId.ELEMENT_ALPHABET_MANUAL_SHIFTED:
|
||||||
return WordComposer.CAPS_MODE_MANUAL_SHIFTED;
|
return WordComposer.CAPS_MODE_MANUAL_SHIFTED;
|
||||||
|
case KeyboardId.ELEMENT_ALPHABET_AUTOMATIC_SHIFTED:
|
||||||
|
return WordComposer.CAPS_MODE_AUTO_SHIFTED;
|
||||||
default:
|
default:
|
||||||
return WordComposer.CAPS_MODE_OFF;
|
return WordComposer.CAPS_MODE_OFF;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.
|
// Factor in auto-caps and manual caps and compute the current caps mode.
|
||||||
private int getActualCapsMode() {
|
private int getActualCapsMode() {
|
||||||
final int manual = mKeyboardSwitcher.getManualCapsMode();
|
final int keyboardShiftMode = mKeyboardSwitcher.getKeyboardShiftMode();
|
||||||
if (manual != WordComposer.CAPS_MODE_OFF) return manual;
|
if (keyboardShiftMode != WordComposer.CAPS_MODE_AUTO_SHIFTED) return keyboardShiftMode;
|
||||||
final int auto = getCurrentAutoCapsState();
|
final int auto = getCurrentAutoCapsState();
|
||||||
if (0 != (auto & TextUtils.CAP_MODE_CHARACTERS)) {
|
if (0 != (auto & TextUtils.CAP_MODE_CHARACTERS)) {
|
||||||
return WordComposer.CAPS_MODE_AUTO_SHIFT_LOCKED;
|
return WordComposer.CAPS_MODE_AUTO_SHIFT_LOCKED;
|
||||||
|
|
Loading…
Reference in New Issue