aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-12-13 12:36:51 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-12-13 12:49:40 +0900
commitdc52e7c646bafb00898c3f2ebec064a5920e58fc (patch)
treebb1b2131d9e98d6da6a0abf9c4322c8f042a9811 /java/src
parent34081186f9bcfcb84fa991ccd940745dcff38cda (diff)
downloadlatinime-dc52e7c646bafb00898c3f2ebec064a5920e58fc.tar.gz
latinime-dc52e7c646bafb00898c3f2ebec064a5920e58fc.tar.xz
latinime-dc52e7c646bafb00898c3f2ebec064a5920e58fc.zip
Remove current keyboard id variable
Change-Id: Iec19af98209e1ea8ecd176d3be04d628d4b38950
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index cae0edd9f..655838a50 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -74,7 +74,6 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions,
private KeyboardId mSymbolsKeyboardId;
private KeyboardId mSymbolsShiftedKeyboardId;
- private KeyboardId mCurrentId;
private final HashMap<KeyboardId, SoftReference<LatinKeyboard>> mKeyboardCache =
new HashMap<KeyboardId, SoftReference<LatinKeyboard>>();
@@ -152,7 +151,7 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions,
}
public void saveKeyboardState() {
- if (mCurrentId != null) {
+ if (isKeyboardAvailable()) {
mState.onSaveKeyboardState();
}
}
@@ -169,7 +168,6 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions,
final Keyboard oldKeyboard = mKeyboardView.getKeyboard();
mKeyboardView.setKeyboard(keyboard);
mCurrentInputView.setKeyboardGeometry(keyboard.mTopPadding);
- mCurrentId = keyboard.mId;
updateShiftLockState(keyboard);
mKeyboardView.setKeyPreviewPopupEnabled(
SettingsValues.isKeyPreviewPopupEnabled(mPrefs, mResources),
@@ -181,12 +179,12 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions,
}
private void updateShiftLockState(Keyboard keyboard) {
- if (mCurrentId.equals(mSymbolsShiftedKeyboardId)) {
+ if (keyboard.mId.equals(mSymbolsShiftedKeyboardId)) {
// Symbol keyboard may have an ALT key that has a caps lock style indicator (a.k.a.
// sticky shift key). To show or dismiss the indicator, we need to call setShiftLocked()
// that takes care of the current keyboard having such ALT key or not.
keyboard.setShiftLocked(keyboard.hasShiftLockKey());
- } else if (mCurrentId.equals(mSymbolsKeyboardId)) {
+ } else if (keyboard.mId.equals(mSymbolsKeyboardId)) {
// Symbol keyboard has an ALT key that has a caps lock style indicator. To disable the
// indicator, we need to call setShiftLocked(false).
keyboard.setShiftLocked(false);