Skip to content
Snippets Groups Projects
Commit d054aa17 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Reset previous symbols shifted state when auto switch backed"

parents 297132ec 4ba22162
No related branches found
No related tags found
No related merge requests found
......@@ -546,16 +546,19 @@ public class KeyboardState {
|| code == Keyboard.CODE_OUTPUT_TEXT)) {
mSwitchState = SWITCH_STATE_SYMBOL;
}
// Switch back to alpha keyboard mode immediately if user types a quote character.
// Switch back to alpha keyboard mode immediately if user types one of the switch back
// characters.
if (isLayoutSwitchBackCharacter(code)) {
toggleAlphabetAndSymbols();
mPrevSymbolsKeyboardWasShifted = false;
}
break;
case SWITCH_STATE_SYMBOL:
// Switch back to alpha keyboard mode if user types one or more non-space/enter
// characters followed by a space/enter or a quote character.
// characters followed by a space/enter or one of the switch back characters.
if (isSpaceCharacter(code) || isLayoutSwitchBackCharacter(code)) {
toggleAlphabetAndSymbols();
mPrevSymbolsKeyboardWasShifted = false;
}
break;
}
......
......@@ -122,6 +122,8 @@ public class KeyboardStateSingleTouchTests extends KeyboardStateTestsBase {
pressAndReleaseKey('~', SYMBOLS_SHIFTED, SYMBOLS_SHIFTED);
// Enter space, switch back to alphabet.
pressAndReleaseKey(CODE_SPACE, SYMBOLS_SHIFTED, ALPHABET_UNSHIFTED);
// Press/release "?123" key, enter into symbols (not symbols shifted).
pressAndReleaseKey(CODE_SYMBOL, SYMBOLS_UNSHIFTED, SYMBOLS_UNSHIFTED);
}
// Automatic switch back to alphabet shift locked test by space key.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment