diff options
author | 2011-12-13 00:27:01 -0800 | |
---|---|---|
committer | 2011-12-13 00:27:01 -0800 | |
commit | 77ecf52a082143ef65fa2de1ca4425ec32ad8cd0 (patch) | |
tree | a4318b07ec1e7d4856ef0646a3c7dfdd7b4eb5b1 /java | |
parent | 0a2494fa5881152a9ed316409ae650353d8969fb (diff) | |
parent | 34f18203960d34dca01c80355bae3549e09aaf88 (diff) | |
download | latinime-77ecf52a082143ef65fa2de1ca4425ec32ad8cd0.tar.gz latinime-77ecf52a082143ef65fa2de1ca4425ec32ad8cd0.tar.xz latinime-77ecf52a082143ef65fa2de1ca4425ec32ad8cd0.zip |
Merge "Remove KeyboardSwitcher.updateShiftLockState method"
Diffstat (limited to 'java')
-rw-r--r-- | java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 655838a50..5c2779213 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -168,7 +168,6 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions, final Keyboard oldKeyboard = mKeyboardView.getKeyboard(); mKeyboardView.setKeyboard(keyboard); mCurrentInputView.setKeyboardGeometry(keyboard.mTopPadding); - updateShiftLockState(keyboard); mKeyboardView.setKeyPreviewPopupEnabled( SettingsValues.isKeyPreviewPopupEnabled(mPrefs, mResources), SettingsValues.getKeyPreviewPopupDismissDelay(mPrefs, mResources)); @@ -178,19 +177,6 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions, updateShiftState(); } - private void updateShiftLockState(Keyboard keyboard) { - 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 (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); - } - } - private LatinKeyboard getKeyboard(KeyboardId id) { final SoftReference<LatinKeyboard> ref = mKeyboardCache.get(id); LatinKeyboard keyboard = (ref == null) ? null : ref.get(); @@ -419,7 +405,13 @@ public class KeyboardSwitcher implements KeyboardState.SwitchActions, // Implements {@link KeyboardState.SwitchActions}. @Override public void setSymbolsShiftedKeyboard() { - setKeyboard(getKeyboard(mSymbolsShiftedKeyboardId)); + final Keyboard keyboard = getKeyboard(mSymbolsShiftedKeyboardId); + setKeyboard(keyboard); + // TODO: Remove this logic once we introduce initial keyboard shift state attribute. + // Symbol shift keyboard may have a shift 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 shift key or not. + keyboard.setShiftLocked(keyboard.hasShiftLockKey()); } public boolean isInMomentarySwitchState() { |