Loading java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +7 −0 Original line number Diff line number Diff line Loading @@ -297,12 +297,19 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { } // Implements {@link KeyboardState.SwitchActions}. // TODO[IL]: merge the two following methods; remove the one without args. @Override public void requestUpdatingShiftState() { mState.onUpdateShiftState(mLatinIME.getCurrentAutoCapsState(), mLatinIME.getCurrentRecapitalizeState()); } // Future method for requesting an updating to the shift state. public void requestUpdatingShiftState(final int currentAutoCapsState, final int currentRecapitalizeState) { mState.onUpdateShiftState(currentAutoCapsState, currentRecapitalizeState); } // Implements {@link KeyboardState.SwitchActions}. @Override public void startDoubleTapShiftKeyTimer() { Loading java/src/com/android/inputmethod/latin/LatinIME.java +10 −5 Original line number Diff line number Diff line Loading @@ -199,7 +199,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen latinIme.mSettings.getCurrent()); break; case MSG_UPDATE_SHIFT_STATE: switcher.requestUpdatingShiftState(); switcher.requestUpdatingShiftState(latinIme.getCurrentAutoCapsState(), latinIme.getCurrentRecapitalizeState()); break; case MSG_SHOW_GESTURE_PREVIEW_AND_SUGGESTION_STRIP: if (msg.arg1 == ARG1_NOT_GESTURE_INPUT) { Loading Loading @@ -843,7 +844,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // we need to re-evaluate the shift state, but not the whole layout which would be // disruptive. // Space state must be updated before calling updateShiftState switcher.requestUpdatingShiftState(); switcher.requestUpdatingShiftState(getCurrentAutoCapsState(), getCurrentRecapitalizeState()); } // This will set the punctuation suggestions if next word suggestion is off; // otherwise it will clear the suggestion strip. Loading Loading @@ -922,7 +924,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // TODO: find a better way to simulate actual execution. if (isInputViewShown() && mInputLogic.onUpdateSelection(oldSelStart, oldSelEnd, newSelStart, newSelEnd)) { mKeyboardSwitcher.requestUpdatingShiftState(); mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(), getCurrentRecapitalizeState()); } mSubtypeState.currentSubtypeUsed(); Loading Loading @@ -1266,7 +1269,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // TODO: have the keyboard pass the correct key code when we need it. final Event event = Event.createSoftwareTextEvent(rawText, Event.NOT_A_KEY_CODE); mInputLogic.onTextInput(mSettings.getCurrent(), event, mHandler); mKeyboardSwitcher.requestUpdatingShiftState(); mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(), getCurrentRecapitalizeState()); mKeyboardSwitcher.onCodeInput(Constants.CODE_OUTPUT_TEXT, getCurrentAutoCapsState()); } Loading Loading @@ -1510,7 +1514,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mHandler.postUpdateShiftState(); break; case InputTransaction.SHIFT_UPDATE_NOW: mKeyboardSwitcher.requestUpdatingShiftState(); mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(), getCurrentRecapitalizeState()); break; default: // SHIFT_NO_UPDATE } Loading java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +6 −3 Original line number Diff line number Diff line Loading @@ -548,7 +548,8 @@ public final class InputLogic { // after typing some letters and a period, then gesturing; the keyboard is not in // caps mode yet, but since a gesture is starting, it should go in caps mode, // unless the user explictly said it should not. keyboardSwitcher.requestUpdatingShiftState(); keyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(settingsValues), getCurrentRecapitalizeState()); } } mConnection.endBatchEdit(); Loading Loading @@ -590,7 +591,8 @@ public final class InputLogic { promotePhantomSpace(settingsValues); mConnection.commitText(commitParts[0], 0); mSpaceState = SpaceState.PHANTOM; keyboardSwitcher.requestUpdatingShiftState(); keyboardSwitcher.requestUpdatingShiftState( getCurrentAutoCapsState(settingsValues), getCurrentRecapitalizeState()); mWordComposer.setCapitalizedModeAndPreviousWordAtStartComposingTime( getActualCapsMode(settingsValues, keyboardSwitcher.getKeyboardShiftMode()), commitParts[0]); Loading Loading @@ -1830,7 +1832,8 @@ public final class InputLogic { } // Space state must be updated before calling updateShiftState mSpaceState = SpaceState.PHANTOM; keyboardSwitcher.requestUpdatingShiftState(); keyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(settingsValues), getCurrentRecapitalizeState()); } /** Loading Loading
java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java +7 −0 Original line number Diff line number Diff line Loading @@ -297,12 +297,19 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions { } // Implements {@link KeyboardState.SwitchActions}. // TODO[IL]: merge the two following methods; remove the one without args. @Override public void requestUpdatingShiftState() { mState.onUpdateShiftState(mLatinIME.getCurrentAutoCapsState(), mLatinIME.getCurrentRecapitalizeState()); } // Future method for requesting an updating to the shift state. public void requestUpdatingShiftState(final int currentAutoCapsState, final int currentRecapitalizeState) { mState.onUpdateShiftState(currentAutoCapsState, currentRecapitalizeState); } // Implements {@link KeyboardState.SwitchActions}. @Override public void startDoubleTapShiftKeyTimer() { Loading
java/src/com/android/inputmethod/latin/LatinIME.java +10 −5 Original line number Diff line number Diff line Loading @@ -199,7 +199,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen latinIme.mSettings.getCurrent()); break; case MSG_UPDATE_SHIFT_STATE: switcher.requestUpdatingShiftState(); switcher.requestUpdatingShiftState(latinIme.getCurrentAutoCapsState(), latinIme.getCurrentRecapitalizeState()); break; case MSG_SHOW_GESTURE_PREVIEW_AND_SUGGESTION_STRIP: if (msg.arg1 == ARG1_NOT_GESTURE_INPUT) { Loading Loading @@ -843,7 +844,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // we need to re-evaluate the shift state, but not the whole layout which would be // disruptive. // Space state must be updated before calling updateShiftState switcher.requestUpdatingShiftState(); switcher.requestUpdatingShiftState(getCurrentAutoCapsState(), getCurrentRecapitalizeState()); } // This will set the punctuation suggestions if next word suggestion is off; // otherwise it will clear the suggestion strip. Loading Loading @@ -922,7 +924,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // TODO: find a better way to simulate actual execution. if (isInputViewShown() && mInputLogic.onUpdateSelection(oldSelStart, oldSelEnd, newSelStart, newSelEnd)) { mKeyboardSwitcher.requestUpdatingShiftState(); mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(), getCurrentRecapitalizeState()); } mSubtypeState.currentSubtypeUsed(); Loading Loading @@ -1266,7 +1269,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // TODO: have the keyboard pass the correct key code when we need it. final Event event = Event.createSoftwareTextEvent(rawText, Event.NOT_A_KEY_CODE); mInputLogic.onTextInput(mSettings.getCurrent(), event, mHandler); mKeyboardSwitcher.requestUpdatingShiftState(); mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(), getCurrentRecapitalizeState()); mKeyboardSwitcher.onCodeInput(Constants.CODE_OUTPUT_TEXT, getCurrentAutoCapsState()); } Loading Loading @@ -1510,7 +1514,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen mHandler.postUpdateShiftState(); break; case InputTransaction.SHIFT_UPDATE_NOW: mKeyboardSwitcher.requestUpdatingShiftState(); mKeyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(), getCurrentRecapitalizeState()); break; default: // SHIFT_NO_UPDATE } Loading
java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +6 −3 Original line number Diff line number Diff line Loading @@ -548,7 +548,8 @@ public final class InputLogic { // after typing some letters and a period, then gesturing; the keyboard is not in // caps mode yet, but since a gesture is starting, it should go in caps mode, // unless the user explictly said it should not. keyboardSwitcher.requestUpdatingShiftState(); keyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(settingsValues), getCurrentRecapitalizeState()); } } mConnection.endBatchEdit(); Loading Loading @@ -590,7 +591,8 @@ public final class InputLogic { promotePhantomSpace(settingsValues); mConnection.commitText(commitParts[0], 0); mSpaceState = SpaceState.PHANTOM; keyboardSwitcher.requestUpdatingShiftState(); keyboardSwitcher.requestUpdatingShiftState( getCurrentAutoCapsState(settingsValues), getCurrentRecapitalizeState()); mWordComposer.setCapitalizedModeAndPreviousWordAtStartComposingTime( getActualCapsMode(settingsValues, keyboardSwitcher.getKeyboardShiftMode()), commitParts[0]); Loading Loading @@ -1830,7 +1832,8 @@ public final class InputLogic { } // Space state must be updated before calling updateShiftState mSpaceState = SpaceState.PHANTOM; keyboardSwitcher.requestUpdatingShiftState(); keyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(settingsValues), getCurrentRecapitalizeState()); } /** Loading