aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-01-24 14:47:46 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-01-24 17:28:00 +0900
commit747ed9e99a6a83e54d97d96aa3cbb1abd11eaf0f (patch)
treeedd44051376faec6453bf309a43f38935c12d0e8 /java/src
parent0f05076990f1308c34c2f12ed793e1e1c41f8ac1 (diff)
downloadlatinime-747ed9e99a6a83e54d97d96aa3cbb1abd11eaf0f.tar.gz
latinime-747ed9e99a6a83e54d97d96aa3cbb1abd11eaf0f.tar.xz
latinime-747ed9e99a6a83e54d97d96aa3cbb1abd11eaf0f.zip
For get the symbols shifted state when switch back from alphabet layout
Bug: 5881820 Change-Id: Ic478264e1cd366affc34fbf4cd59f1b6e7efede7
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java
index 007b10112..f89f156ea 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java
@@ -302,8 +302,7 @@ public class KeyboardState {
if (code == Keyboard.CODE_SHIFT) {
onReleaseShift(withSliding);
} else if (code == Keyboard.CODE_SWITCH_ALPHA_SYMBOL) {
- // TODO: Make use of withSliding instead of relying on mSwitchState.
- onReleaseSymbol();
+ onReleaseSymbol(withSliding);
}
}
@@ -313,11 +312,16 @@ public class KeyboardState {
mSwitchState = SWITCH_STATE_MOMENTARY_ALPHA_AND_SYMBOL;
}
- private void onReleaseSymbol() {
- // Switch back to the previous keyboard mode if the user chords the mode change key and
- // another key, then releases the mode change key.
+ private void onReleaseSymbol(boolean withSliding) {
if (mSwitchState == SWITCH_STATE_CHORDING_ALPHA) {
+ // Switch back to the previous keyboard mode if the user chords the mode change key and
+ // another key, then releases the mode change key.
toggleAlphabetAndSymbols();
+ } else if (!withSliding) {
+ // If the mode change key is being released without sliding, we should forget the
+ // previous symbols keyboard shift state and simply switch back to symbols layout
+ // (never symbols shifted) next time the mode gets changed to symbols layout.
+ mPrevSymbolsKeyboardWasShifted = false;
}
mSymbolKeyState.onRelease();
}