Don't restrict reset composing state to non-identical setText

Bug: 7497063
Change-Id: Ifbd5c37408131867458fd921bdef46ef90d81478
main
Jean Chalard 2012-11-09 18:58:50 +09:00
parent bc43e3f290
commit 61cc2a3391
1 changed files with 10 additions and 14 deletions

View File

@ -704,11 +704,8 @@ 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.
// 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;
@ -719,7 +716,6 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
// otherwise it will clear the suggestion strip.
setPunctuationSuggestions();
}
}
mConnection.resetCachesUponCursorMove(editorInfo.initialSelStart);