aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-11-14 17:37:55 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-11-14 18:44:43 +0900
commitd0725a68421203ae42d78ceed57767a5204e858e (patch)
tree1748d69c013c7a95a842235f5249c83d4e7e3f3c /java
parent7648b37d1e4cf3799288f85cc9c5f67b515e24c4 (diff)
downloadlatinime-d0725a68421203ae42d78ceed57767a5204e858e.tar.gz
latinime-d0725a68421203ae42d78ceed57767a5204e858e.tar.xz
latinime-d0725a68421203ae42d78ceed57767a5204e858e.zip
Update shift state only when input field is restarted
Bug: 7482766 Change-Id: Ifdfa110c44b95acfbcd3e0aa34f675c70b7d7285
Diffstat (limited to 'java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java15
1 files changed, 5 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index f578cc8de..1436a10ac 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -683,8 +683,6 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
accessUtils.onStartInputViewInternal(mainKeyboardView, editorInfo, restarting);
}
- final boolean selectionChanged = mLastSelectionStart != editorInfo.initialSelStart
- || mLastSelectionEnd != editorInfo.initialSelEnd;
final boolean inputTypeChanged = !mCurrentSettings.isSameInputType(editorInfo);
final boolean isDifferentTextField = !restarting || inputTypeChanged;
if (isDifferentTextField) {
@@ -732,20 +730,17 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
// 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();
+ // In apps like Talk, we come here when the text is sent and the field gets emptied and
+ // 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.updateShiftState();
}
setSuggestionStripShownInternal(
isSuggestionsStripVisible(), /* needsInputViewShown */ false);
mLastSelectionStart = editorInfo.initialSelStart;
mLastSelectionEnd = editorInfo.initialSelEnd;
- // If we come here something in the text state is very likely to have changed.
- // We should update the shift state regardless of whether we are restarting or not, because
- // this is not perceived as a layout change that may be disruptive like we may have with
- // switcher.loadKeyboard; in apps like Talk, we come here when the text is sent and the
- // field gets emptied and 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
- mKeyboardSwitcher.updateShiftState();
mHandler.cancelUpdateSuggestionStrip();
mHandler.cancelDoubleSpacesTimer();