diff options
author | 2012-11-12 23:48:20 -0800 | |
---|---|---|
committer | 2012-11-12 23:48:20 -0800 | |
commit | 80d7d32424dd856a2f55fea981a5a511a09d2ee9 (patch) | |
tree | 77a16a704804c601d2652f4286690771e43979a1 /java | |
parent | 1b909c2846cfe55910c791904afd493f2519dd85 (diff) | |
parent | d2116eb2ea7d08e81b7efe5e342772ffcd8a7efc (diff) | |
download | latinime-80d7d32424dd856a2f55fea981a5a511a09d2ee9.tar.gz latinime-80d7d32424dd856a2f55fea981a5a511a09d2ee9.tar.xz latinime-80d7d32424dd856a2f55fea981a5a511a09d2ee9.zip |
am d2116eb2: am 7d34763e: am fac619a3: Merge "Don\'t restrict reset composing state to non-identical setText" into jb-mr1.1-dev
* commit 'd2116eb2ea7d08e81b7efe5e342772ffcd8a7efc':
Don't restrict reset composing state to non-identical setText
Diffstat (limited to 'java')
-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 60bed8429..b680cb7fd 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -710,21 +710,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); |