diff options
author | 2012-11-12 23:00:12 -0800 | |
---|---|---|
committer | 2012-11-12 23:00:12 -0800 | |
commit | fac619a34c8101cac504db500d74114dc8768372 (patch) | |
tree | ac4e456de1ce5d6dbf600ac92930b86d29e19f2d /java/src | |
parent | 0e84041bf740590230198fa845d8c45acd4cb586 (diff) | |
parent | 61cc2a33911ff2a8115ce727c8cac6d73d989c42 (diff) | |
download | latinime-fac619a34c8101cac504db500d74114dc8768372.tar.gz latinime-fac619a34c8101cac504db500d74114dc8768372.tar.xz latinime-fac619a34c8101cac504db500d74114dc8768372.zip |
Merge "Don't restrict reset composing state to non-identical setText" into jb-mr1.1-dev
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 023619dc9..f578cc8de 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -704,21 +704,17 @@ public final class LatinIME extends InputMethodService implements KeyboardAction updateFullscreenMode(); mApplicationSpecifiedCompletions = null; - if (isDifferentTextField || selectionChanged) { - // If the selection changed, we reset the input state. Essentially, we come here with - // restarting == true when the app called setText() or similar. We should reset the - // state if the app set the text to something else, but keep it if it set a suggestion - // or something. - mEnteredText = null; - resetComposingState(true /* alsoResetLastComposedWord */); - mDeleteCount = 0; - mSpaceState = SPACE_STATE_NONE; + // The app calling setText() has the effect of clearing the composing + // span, so we should reset our state unconditionally, even if restarting is true. + mEnteredText = null; + resetComposingState(true /* alsoResetLastComposedWord */); + mDeleteCount = 0; + mSpaceState = SPACE_STATE_NONE; - if (mSuggestionStripView != null) { - // This will set the punctuation suggestions if next word suggestion is off; - // otherwise it will clear the suggestion strip. - setPunctuationSuggestions(); - } + if (mSuggestionStripView != null) { + // This will set the punctuation suggestions if next word suggestion is off; + // otherwise it will clear the suggestion strip. + setPunctuationSuggestions(); } mConnection.resetCachesUponCursorMove(editorInfo.initialSelStart); |