aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-01-24 00:52:06 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-01-24 00:52:06 -0800
commit55a1bc7e59cda46fe9b0abd1621f669479464e8e (patch)
treeedd44051376faec6453bf309a43f38935c12d0e8 /java/src/com/android/inputmethod
parentb2c6ee2021e525db389f2d71c81d04715a49e934 (diff)
parent747ed9e99a6a83e54d97d96aa3cbb1abd11eaf0f (diff)
downloadlatinime-55a1bc7e59cda46fe9b0abd1621f669479464e8e.tar.gz
latinime-55a1bc7e59cda46fe9b0abd1621f669479464e8e.tar.xz
latinime-55a1bc7e59cda46fe9b0abd1621f669479464e8e.zip
am 747ed9e9: For get the symbols shifted state when switch back from alphabet layout
* commit '747ed9e99a6a83e54d97d96aa3cbb1abd11eaf0f': For get the symbols shifted state when switch back from alphabet layout
Diffstat (limited to 'java/src/com/android/inputmethod')
-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();
}