Remember shift locked state when switching between Main keyboard and Symbols

Bug: 5553660
Change-Id: Icb15a9f8a58243bd113c2d4897fee623ac48b66d
main
Tadashi G. Takaoka 2011-11-04 15:58:49 +09:00
parent 1e39565bb4
commit cb83b300e7
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}
}