From f178685c110306d4fcf9fa1399b6d6d40ccddb76 Mon Sep 17 00:00:00 2001
From: Jean Chalard <jchalard@google.com>
Date: Wed, 9 Oct 2013 12:15:21 +0900
Subject: [PATCH] Always call finishComposingText before recapitalization

Workaround for framework bug:
Bug: 10792236

Change-Id: I3706b9eed5223889791840e30660f8d17625cb70
---
 java/src/com/android/inputmethod/latin/LatinIME.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 4d95ca3af6..b668a77705 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -2307,6 +2307,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
                 mLastSelectionEnd = mRecapitalizeStatus.getNewCursorEnd();
             }
         }
+        mConnection.finishComposingText();
         mRecapitalizeStatus.rotate();
         final int numCharsDeleted = mLastSelectionEnd - mLastSelectionStart;
         mConnection.setSelection(mLastSelectionEnd, mLastSelectionEnd);
-- 
GitLab