aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-12-07 17:55:22 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-12-07 17:55:22 +0900
commitbc56e0442586ecfcbd18cbdd138996b17ea79b6b (patch)
tree9340c36dc73180677d388924ab7ea4f772d2d5ca /java/src
parent55c0198eee18dfa4ec750d23fc589bced289d23c (diff)
downloadlatinime-bc56e0442586ecfcbd18cbdd138996b17ea79b6b.tar.gz
latinime-bc56e0442586ecfcbd18cbdd138996b17ea79b6b.tar.xz
latinime-bc56e0442586ecfcbd18cbdd138996b17ea79b6b.zip
Reset keyboard state when loading keyboard
Bug: 5627467 Change-Id: I709f97e47144d3270450adc7d8053038d0df57bc
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java1
-rw-r--r--java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java7
2 files changed, 8 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index 32aabf928..5ae044802 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -205,6 +205,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
mMainKeyboardId = getKeyboardId(editorInfo, false, false, settingsValues);
mSymbolsKeyboardId = getKeyboardId(editorInfo, true, false, settingsValues);
mSymbolsShiftedKeyboardId = getKeyboardId(editorInfo, true, true, settingsValues);
+ mState.onLoadKeyboard();
mLayoutSwitchBackSymbols = mResources.getString(R.string.layout_switch_back_symbols);
setKeyboard(getKeyboard(mSavedKeyboardState.getKeyboardId()));
mSavedKeyboardState.restore();
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java
index fd7e77863..b9450c643 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java
@@ -27,6 +27,13 @@ public class KeyboardState {
public KeyboardState() {
}
+ public void onLoadKeyboard() {
+ mKeyboardShiftState.setShifted(false);
+ mKeyboardShiftState.setShiftLocked(false);
+ mShiftKeyState.onRelease();
+ mSymbolKeyState.onRelease();
+ }
+
public boolean isShiftLocked() {
return mKeyboardShiftState.isShiftLocked();
}