From 8ab4ae4377fca97cb9ef05c615c5a59bc4bc3d8c Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Thu, 27 Mar 2014 18:37:16 +0900 Subject: [IL133] Avoid calling a dangerous method from outside. We want to remove all calls to this as it lets internal values escape, but there is some refactoring to do to finish this. Bug: 8636060 Change-Id: Iedba6afe4719bc0add868714a1ee5a04b7ead33e --- .../src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java') diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 536d6ef39..30357943c 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -537,7 +537,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(); @@ -579,7 +580,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]); @@ -1821,7 +1823,8 @@ public final class InputLogic { } // Space state must be updated before calling updateShiftState mSpaceState = SpaceState.PHANTOM; - keyboardSwitcher.requestUpdatingShiftState(); + keyboardSwitcher.requestUpdatingShiftState(getCurrentAutoCapsState(settingsValues), + getCurrentRecapitalizeState()); } /** -- cgit v1.2.3-83-g751a