diff options
author | 2013-05-15 12:47:00 -0700 | |
---|---|---|
committer | 2013-05-15 12:47:00 -0700 | |
commit | 29177deb55d260125771ea554e2df119e6ba6e75 (patch) | |
tree | 50cc2fc15ed8dcd49006089f85320c6d2248eb24 /java/src/com/android/inputmethod/latin/RichInputConnection.java | |
parent | c990ed5e8e62908d5356bb253e8752e94811b134 (diff) | |
parent | 114ec4ac9f2731419b6e1167067a4baffbefa6ea (diff) | |
download | latinime-29177deb55d260125771ea554e2df119e6ba6e75.tar.gz latinime-29177deb55d260125771ea554e2df119e6ba6e75.tar.xz latinime-29177deb55d260125771ea554e2df119e6ba6e75.zip |
am 114ec4ac: am 71d52474: Merge "Optimizations and safeguards."
* commit '114ec4ac9f2731419b6e1167067a4baffbefa6ea':
Optimizations and safeguards.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/RichInputConnection.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/RichInputConnection.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java index 8ed7ab264..980215de6 100644 --- a/java/src/com/android/inputmethod/latin/RichInputConnection.java +++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java @@ -135,13 +135,14 @@ public final class RichInputConnection { if (DEBUG_PREVIOUS_TEXT) checkConsistencyForDebug(); } - public void resetCachesUponCursorMove(final int newCursorPosition) { + public void resetCachesUponCursorMove(final int newCursorPosition, + final boolean shouldFinishComposition) { mCurrentCursorPosition = newCursorPosition; mComposingText.setLength(0); mCommittedTextBeforeComposingText.setLength(0); final CharSequence textBeforeCursor = getTextBeforeCursor(DEFAULT_TEXT_CACHE_SIZE, 0); if (null != textBeforeCursor) mCommittedTextBeforeComposingText.append(textBeforeCursor); - if (null != mIC) { + if (null != mIC && shouldFinishComposition) { mIC.finishComposingText(); if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { ResearchLogger.richInputConnection_finishComposingText(); |