am 8f116d7c: Merge "Invoke onWordCommitUserTyped on startInput() with non empty wordcomposer"

* commit '8f116d7cdab57ef6bdccb870240d548a437ca0c9':
  Invoke onWordCommitUserTyped on startInput() with non empty wordcomposer
main
Mohammadinamul Sheik 2014-09-22 02:24:56 +00:00 committed by Android Git Automerger
commit ab4a6604d1
1 changed files with 7 additions and 0 deletions

View File

@ -145,6 +145,13 @@ public final class InputLogic {
*/ */
public void startInput(final String combiningSpec, final SettingsValues settingsValues) { public void startInput(final String combiningSpec, final SettingsValues settingsValues) {
mEnteredText = null; mEnteredText = null;
if (!mWordComposer.getTypedWord().isEmpty()) {
// For messaging apps that offer send button, the IME does not get the opportunity
// to capture the last word. This block should capture those uncommitted words.
// The timestamp at which it is captured is not accurate but close enough.
StatsUtils.onWordCommitUserTyped(
mWordComposer.getTypedWord(), mWordComposer.isBatchMode());
}
mWordComposer.restartCombining(combiningSpec); mWordComposer.restartCombining(combiningSpec);
resetComposingState(true /* alsoResetLastComposedWord */); resetComposingState(true /* alsoResetLastComposedWord */);
mDeleteCount = 0; mDeleteCount = 0;