am 60211f0d: am 2631fe4c: am 6686e63f: Honor automatic shift turned off for gestures

* commit '60211f0d250ca931788d32d5a69c880f75ef7d49':
  Honor automatic shift turned off for gestures
main
Jean Chalard 2012-10-16 17:28:18 -07:00 committed by Android Git Automerger
commit fa3d984d1b
2 changed files with 5 additions and 3 deletions

View File

@ -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;
}

View File

@ -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;