From 309ab664a87be67dbf029a0ac812f1755148396b Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 14 May 2014 16:55:32 +0900 Subject: [PATCH] Don't send empty composing texts. Bug: 13160467 Change-Id: I5e3204ac8aaa18fe9219cc6b564b832ab6cf94fc --- .../android/inputmethod/latin/inputlogic/InputLogic.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 8b795b82f..1156c7737 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -936,7 +936,11 @@ public final class InputLogic { } else { mWordComposer.processEvent(inputTransaction.mEvent); } - mConnection.setComposingText(getTextWithUnderline(mWordComposer.getTypedWord()), 1); + if (mWordComposer.isComposingWord()) { + mConnection.setComposingText(getTextWithUnderline(mWordComposer.getTypedWord()), 1); + } else { + mConnection.commitText("", 1); + } inputTransaction.setRequiresUpdateSuggestions(); } else { if (mLastComposedWord.canRevertCommit()) {