am 42e83c7f: Fix a race condition.
* commit '42e83c7f06a1683b27a11564aeb9f3999b10382f': Fix a race condition.main
commit
f8b49631fd
|
@ -1113,8 +1113,11 @@ public final class InputLogic {
|
||||||
keyboardSwitcher.getKeyboard());
|
keyboardSwitcher.getKeyboard());
|
||||||
mWordComposer.setCursorPositionWithinWord(
|
mWordComposer.setCursorPositionWithinWord(
|
||||||
typedWord.codePointCount(0, numberOfCharsInWordBeforeCursor));
|
typedWord.codePointCount(0, numberOfCharsInWordBeforeCursor));
|
||||||
mConnection.setComposingRegion(expectedCursorPosition - numberOfCharsInWordBeforeCursor,
|
// TODO: Change these two lines to setComposingRegion(cursorPosition,
|
||||||
expectedCursorPosition + range.getNumberOfCharsInWordAfterCursor());
|
// cursorPosition + 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.
|
||||||
|
|
Loading…
Reference in New Issue