Revert "Fix a race condition."

This reverts commit 42e83c7f06.

Bug: 12434783
Change-Id: Id01b6d14906430b13e64f5fc4d7fb01572d0a960
This commit is contained in:
Victoria Lease 2014-01-07 23:26:54 +00:00 committed by The Android Automerger
parent 8a2537e0ae
commit faa4c7b641

View file

@ -1113,11 +1113,8 @@ public final class InputLogic {
keyboardSwitcher.getKeyboard()); keyboardSwitcher.getKeyboard());
mWordComposer.setCursorPositionWithinWord( mWordComposer.setCursorPositionWithinWord(
typedWord.codePointCount(0, numberOfCharsInWordBeforeCursor)); typedWord.codePointCount(0, numberOfCharsInWordBeforeCursor));
// TODO: Change these two lines to setComposingRegion(cursorPosition, mConnection.setComposingRegion(expectedCursorPosition - numberOfCharsInWordBeforeCursor,
// cursorPosition + range.getNumberOfCharsInWordAfterCursor()); expectedCursorPosition + range.getNumberOfCharsInWordAfterCursor());
mConnection.deleteSurroundingText(numberOfCharsInWordBeforeCursor,
typedWord.length() - numberOfCharsInWordBeforeCursor);
mConnection.setComposingText(typedWord, 1);
if (suggestions.isEmpty()) { if (suggestions.isEmpty()) {
// We come here if there weren't any suggestion spans on this word. We will try to // We come here if there weren't any suggestion spans on this word. We will try to
// compute suggestions for it instead. // compute suggestions for it instead.