mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Reset keyboard state when loading keyboard
Bug: 5627467 Change-Id: I709f97e47144d3270450adc7d8053038d0df57bc
This commit is contained in:
parent
55c0198eee
commit
bc56e04425
@ -205,6 +205,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
|
||||
mMainKeyboardId = getKeyboardId(editorInfo, false, false, settingsValues);
|
||||
mSymbolsKeyboardId = getKeyboardId(editorInfo, true, false, settingsValues);
|
||||
mSymbolsShiftedKeyboardId = getKeyboardId(editorInfo, true, true, settingsValues);
|
||||
mState.onLoadKeyboard();
|
||||
mLayoutSwitchBackSymbols = mResources.getString(R.string.layout_switch_back_symbols);
|
||||
setKeyboard(getKeyboard(mSavedKeyboardState.getKeyboardId()));
|
||||
mSavedKeyboardState.restore();
|
||||
|
@ -27,6 +27,13 @@ public class KeyboardState {
|
||||
public KeyboardState() {
|
||||
}
|
||||
|
||||
public void onLoadKeyboard() {
|
||||
mKeyboardShiftState.setShifted(false);
|
||||
mKeyboardShiftState.setShiftLocked(false);
|
||||
mShiftKeyState.onRelease();
|
||||
mSymbolKeyState.onRelease();
|
||||
}
|
||||
|
||||
public boolean isShiftLocked() {
|
||||
return mKeyboardShiftState.isShiftLocked();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user