From a78b0f6b9e03cc9822e9f61a70ec5c3ed7ce3526 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Mon, 25 Nov 2013 12:55:52 +0900 Subject: [PATCH] Fix a failing test Bug: 11846748 Change-Id: Ieda55477201c11fb31b0f84e70ecd081211c78fc --- .../src/com/android/inputmethod/latin/RichInputConnection.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java index 4a7f530f9..5aa824ed4 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -243,6 +243,7 @@ public final class RichInputConnection { if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug(); mCommittedTextBeforeComposingText.append(text); mExpectedSelStart += text.length() - mComposingText.length(); + mExpectedSelEnd = mExpectedSelStart; mComposingText.setLength(0); if (null != mIC) { mIC.commitText(text, i); @@ -493,6 +494,7 @@ public final class RichInputConnection { if (DEBUG_BATCH_NESTING) checkBatchEdit(); if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug(); mExpectedSelStart = start; + mExpectedSelEnd = end; if (null != mIC) { final boolean isIcValid = mIC.setSelection(start, end); if (!isIcValid) { @@ -524,6 +526,7 @@ public final class RichInputConnection { if (null == text) text = ""; mCommittedTextBeforeComposingText.append(text); mExpectedSelStart += text.length() - mComposingText.length(); + mExpectedSelEnd = mExpectedSelStart; mComposingText.setLength(0); if (null != mIC) { mIC.commitCompletion(completionInfo);