aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-11-14 16:34:42 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-11-14 16:34:42 -0800
commit0dfb89b41ef876e163afd37b854b37386502d49e (patch)
tree4b7e12266b0ad905c68c9f1f90cb8f6d8993d238 /java/src
parent712b5e8f1059d8a9c409a6931a374b94b242121e (diff)
parenteea28db3333a734bf73e688b8335245929d5f322 (diff)
downloadlatinime-0dfb89b41ef876e163afd37b854b37386502d49e.tar.gz
latinime-0dfb89b41ef876e163afd37b854b37386502d49e.tar.xz
latinime-0dfb89b41ef876e163afd37b854b37386502d49e.zip
am eea28db3: am d4886ff5: am 929bfdd0: Merge "Update shift state only when input field is restarted" into jb-mr1.1-dev
* commit 'eea28db3333a734bf73e688b8335245929d5f322': Update shift state only when input field is restarted
Diffstat (limited to 'java/src')
-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 5f7907326..f6c5f8277 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -715,8 +715,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) {
@@ -764,20 +762,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();