aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java20
1 files changed, 15 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 2cfecd740..059f36288 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -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) {
@@ -641,6 +642,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
super.onDestroy();
}
+ @UsedForTesting
+ public void recycle() {
+ mInputLogic.recycle();
+ }
+
@Override
public void onConfigurationChanged(final Configuration conf) {
// If orientation changed while predicting, commit the change
@@ -844,7 +850,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.
@@ -923,7 +930,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();
@@ -1275,7 +1283,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());
}
@@ -1519,7 +1528,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
}