diff options
author | 2012-11-14 16:31:31 -0800 | |
---|---|---|
committer | 2012-11-14 16:31:31 -0800 | |
commit | d4886ff5419003c3bf996939ba87e4b49bcdbfae (patch) | |
tree | b634de56dc2c11caac1607452f9d62a276b1e570 /java/src | |
parent | 428d1b6469b5bc9041c35a7e1ee1476d5aacedd7 (diff) | |
parent | 929bfdd059df5bb0340a3b22a3feff211f03798e (diff) | |
download | latinime-d4886ff5419003c3bf996939ba87e4b49bcdbfae.tar.gz latinime-d4886ff5419003c3bf996939ba87e4b49bcdbfae.tar.xz latinime-d4886ff5419003c3bf996939ba87e4b49bcdbfae.zip |
am 929bfdd0: Merge "Update shift state only when input field is restarted" into jb-mr1.1-dev
* commit '929bfdd059df5bb0340a3b22a3feff211f03798e':
Update shift state only when input field is restarted
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 15 |
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 70b387bec..ddfc27310 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -711,8 +711,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) { @@ -760,20 +758,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(); |