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
main
Jean Chalard 2012-11-12 23:48:20 -08:00 committed by Android Git Automerger
commit 80d7d32424
1 changed files with 10 additions and 14 deletions

View File

@ -710,11 +710,8 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
updateFullscreenMode(); updateFullscreenMode();
mApplicationSpecifiedCompletions = null; mApplicationSpecifiedCompletions = null;
if (isDifferentTextField || selectionChanged) { // The app calling setText() has the effect of clearing the composing
// If the selection changed, we reset the input state. Essentially, we come here with // span, so we should reset our state unconditionally, even if restarting is true.
// 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; mEnteredText = null;
resetComposingState(true /* alsoResetLastComposedWord */); resetComposingState(true /* alsoResetLastComposedWord */);
mDeleteCount = 0; mDeleteCount = 0;
@ -725,7 +722,6 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
// otherwise it will clear the suggestion strip. // otherwise it will clear the suggestion strip.
setPunctuationSuggestions(); setPunctuationSuggestions();
} }
}
mConnection.resetCachesUponCursorMove(editorInfo.initialSelStart); mConnection.resetCachesUponCursorMove(editorInfo.initialSelStart);