Fix saving keyboard state while rotating

This change also uses longer timeout for restoring keyboard state.

Bug: 4311428
Change-Id: Ieade33d7c69f1dee727b2b8c26f0112eca44b336
This commit is contained in:
Tadashi G. Takaoka 2011-08-03 09:39:42 -07:00
parent eedfef0308
commit 38b5605fee
2 changed files with 8 additions and 3 deletions

View file

@ -188,8 +188,13 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
public void save() { public void save() {
mIsAlphabetMode = isAlphabetMode(); mIsAlphabetMode = isAlphabetMode();
mIsShiftLocked = mIsAlphabetMode && isShiftLocked(); if (mIsAlphabetMode) {
mIsShiftLocked = isShiftLocked();
mIsShifted = !mIsShiftLocked && isShiftedOrShiftLocked(); mIsShifted = !mIsShiftLocked && isShiftedOrShiftLocked();
} else {
mIsShiftLocked = false;
mIsShifted = mSymbolsShiftedKeyboardId.equals(mCurrentId);
}
mIsValid = true; mIsValid = true;
} }

View file

@ -115,7 +115,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
private static final int SCREEN_ORIENTATION_CHANGE_DETECTION_DELAY = 2; private static final int SCREEN_ORIENTATION_CHANGE_DETECTION_DELAY = 2;
private static final int ACCUMULATE_START_INPUT_VIEW_DELAY = 20; private static final int ACCUMULATE_START_INPUT_VIEW_DELAY = 20;
private static final int RESTORE_KEYBOARD_STATE_DELAY = 200; private static final int RESTORE_KEYBOARD_STATE_DELAY = 300;
/** /**
* The name of the scheme used by the Package Manager to warn of a new package installation, * The name of the scheme used by the Package Manager to warn of a new package installation,