From cb83b300e73700449dec0bd9415d6e1df409c441 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Fri, 4 Nov 2011 15:58:49 +0900 Subject: [PATCH] Remember shift locked state when switching between Main keyboard and Symbols Bug: 5553660 Change-Id: Icb15a9f8a58243bd113c2d4897fee623ac48b66d --- .../com/android/inputmethod/keyboard/KeyboardSwitcher.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java index 83871a602..139e5eddf 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java @@ -656,11 +656,16 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha return mKeyboardView == null ? 0 : mKeyboardView.getPointerCount(); } + private boolean mPrevMainKeyboardWasShiftLocked; + private void toggleKeyboardMode() { if (mCurrentId.equals(mMainKeyboardId)) { + mPrevMainKeyboardWasShiftLocked = isShiftLocked(); setKeyboard(getKeyboard(mSymbolsKeyboardId)); } else { setKeyboard(getKeyboard(mMainKeyboardId)); + setShiftLocked(mPrevMainKeyboardWasShiftLocked); + mPrevMainKeyboardWasShiftLocked = false; } }