am 4eef5101: am aa5d6fe0: am 9cc22c45: am 5d2556b9: Reset the IME if requested by the app.
* commit '4eef51016adc4e103fa65d944a0ab31527ddced8': Reset the IME if requested by the app.main
commit
43f579e9f6
|
@ -204,6 +204,12 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||||
mState.onUpdateShiftState(mLatinIME.getCurrentAutoCapsState());
|
mState.onUpdateShiftState(mLatinIME.getCurrentAutoCapsState());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Remove this method. Come up with a more comprehensive way to reset the keyboard layout
|
||||||
|
// when a keyboard layout set doesn't get reloaded in LatinIME.onStartInputViewInternal().
|
||||||
|
public void resetKeyboardStateToAlphabet() {
|
||||||
|
mState.onResetKeyboardStateToAlphabet();
|
||||||
|
}
|
||||||
|
|
||||||
public void onPressKey(int code) {
|
public void onPressKey(int code) {
|
||||||
if (isVibrateAndSoundFeedbackRequired()) {
|
if (isVibrateAndSoundFeedbackRequired()) {
|
||||||
mFeedbackManager.hapticAndAudioFeedback(code, mKeyboardView);
|
mFeedbackManager.hapticAndAudioFeedback(code, mKeyboardView);
|
||||||
|
|
|
@ -253,6 +253,22 @@ public final class KeyboardState {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Remove this method. Come up with a more comprehensive way to reset the keyboard layout
|
||||||
|
// when a keyboard layout set doesn't get reloaded in LatinIME.onStartInputViewInternal().
|
||||||
|
private void resetKeyboardStateToAlphabet() {
|
||||||
|
if (DEBUG_ACTION) {
|
||||||
|
Log.d(TAG, "resetKeyboardStateToAlphabet: " + this);
|
||||||
|
}
|
||||||
|
if (mIsAlphabetMode) return;
|
||||||
|
|
||||||
|
mPrevSymbolsKeyboardWasShifted = mIsSymbolShifted;
|
||||||
|
setAlphabetKeyboard();
|
||||||
|
if (mPrevMainKeyboardWasShiftLocked) {
|
||||||
|
setShiftLocked(true);
|
||||||
|
}
|
||||||
|
mPrevMainKeyboardWasShiftLocked = false;
|
||||||
|
}
|
||||||
|
|
||||||
private void toggleShiftInSymbols() {
|
private void toggleShiftInSymbols() {
|
||||||
if (mIsSymbolShifted) {
|
if (mIsSymbolShifted) {
|
||||||
setSymbolsKeyboard();
|
setSymbolsKeyboard();
|
||||||
|
@ -379,6 +395,15 @@ public final class KeyboardState {
|
||||||
updateAlphabetShiftState(autoCaps);
|
updateAlphabetShiftState(autoCaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Remove this method. Come up with a more comprehensive way to reset the keyboard layout
|
||||||
|
// when a keyboard layout set doesn't get reloaded in LatinIME.onStartInputViewInternal().
|
||||||
|
public void onResetKeyboardStateToAlphabet() {
|
||||||
|
if (DEBUG_EVENT) {
|
||||||
|
Log.d(TAG, "onResetKeyboardStateToAlphabet: " + this);
|
||||||
|
}
|
||||||
|
resetKeyboardStateToAlphabet();
|
||||||
|
}
|
||||||
|
|
||||||
private void updateAlphabetShiftState(int autoCaps) {
|
private void updateAlphabetShiftState(int autoCaps) {
|
||||||
if (!mIsAlphabetMode) return;
|
if (!mIsAlphabetMode) return;
|
||||||
if (!mShiftKeyState.isReleasing()) {
|
if (!mShiftKeyState.isReleasing()) {
|
||||||
|
|
|
@ -730,6 +730,10 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
|
||||||
}
|
}
|
||||||
|
|
||||||
switcher.loadKeyboard(editorInfo, mCurrentSettings);
|
switcher.loadKeyboard(editorInfo, mCurrentSettings);
|
||||||
|
} else if (restarting) {
|
||||||
|
// TODO: Come up with a more comprehensive way to reset the keyboard layout when
|
||||||
|
// a keyboard layout set doesn't get reloaded in this method.
|
||||||
|
switcher.resetKeyboardStateToAlphabet();
|
||||||
}
|
}
|
||||||
setSuggestionStripShownInternal(
|
setSuggestionStripShownInternal(
|
||||||
isSuggestionsStripVisible(), /* needsInputViewShown */ false);
|
isSuggestionsStripVisible(), /* needsInputViewShown */ false);
|
||||||
|
|
Loading…
Reference in New Issue