am 187e683a: Merge "Fix a bug with some text fields" into jb-mr1.1-dev

* commit '187e683aea117fde1ad2de2d0cdd18c3fd4ce7f4':
  Fix a bug with some text fields
main
Jean Chalard 2012-11-14 20:38:19 -08:00 committed by Android Git Automerger
commit 5dee6e69f1
1 changed files with 2 additions and 1 deletions

View File

@ -145,7 +145,8 @@ public final class RichInputConnection {
mCurrentCursorPosition = newCursorPosition; mCurrentCursorPosition = newCursorPosition;
mComposingText.setLength(0); mComposingText.setLength(0);
mCommittedTextBeforeComposingText.setLength(0); mCommittedTextBeforeComposingText.setLength(0);
mCommittedTextBeforeComposingText.append(getTextBeforeCursor(DEFAULT_TEXT_CACHE_SIZE, 0)); final CharSequence textBeforeCursor = getTextBeforeCursor(DEFAULT_TEXT_CACHE_SIZE, 0);
if (null != textBeforeCursor) mCommittedTextBeforeComposingText.append(textBeforeCursor);
mCharAfterTheCursor = getTextAfterCursor(1, 0); mCharAfterTheCursor = getTextAfterCursor(1, 0);
if (null != mIC) { if (null != mIC) {
mIC.finishComposingText(); mIC.finishComposingText();