[IL80] Reverse a test for clarity.
Bug: 8636060 Change-Id: I5092942ab4fd6aaf37023083040cadbc18583fd1
This commit is contained in:
parent
f59487379e
commit
f1e5b9b4d1
1 changed files with 50 additions and 51 deletions
|
@ -195,7 +195,9 @@ public final class InputLogic {
|
||||||
final int oldSelStart, final int oldSelEnd,
|
final int oldSelStart, final int oldSelEnd,
|
||||||
final int newSelStart, final int newSelEnd,
|
final int newSelStart, final int newSelEnd,
|
||||||
final int composingSpanStart, final int composingSpanEnd) {
|
final int composingSpanStart, final int composingSpanEnd) {
|
||||||
if (!mConnection.isBelatedExpectedUpdate(oldSelStart, newSelStart, oldSelEnd, newSelEnd)) {
|
if (mConnection.isBelatedExpectedUpdate(oldSelStart, newSelStart, oldSelEnd, newSelEnd)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// TODO: the following is probably better done in resetEntireInputState().
|
// TODO: the following is probably better done in resetEntireInputState().
|
||||||
// it should only happen when the cursor moved, and the very purpose of the
|
// it should only happen when the cursor moved, and the very purpose of the
|
||||||
// test below is to narrow down whether this happened or not. Likewise with
|
// test below is to narrow down whether this happened or not. Likewise with
|
||||||
|
@ -216,8 +218,7 @@ public final class InputLogic {
|
||||||
// TODO: is it still necessary to test for composingSpan related stuff?
|
// TODO: is it still necessary to test for composingSpan related stuff?
|
||||||
final boolean selectionChangedOrSafeToReset = selectionChanged
|
final boolean selectionChangedOrSafeToReset = selectionChanged
|
||||||
|| (!mWordComposer.isComposingWord()) || noComposingSpan;
|
|| (!mWordComposer.isComposingWord()) || noComposingSpan;
|
||||||
final boolean hasOrHadSelection = (oldSelStart != oldSelEnd
|
final boolean hasOrHadSelection = (oldSelStart != oldSelEnd || newSelStart != newSelEnd);
|
||||||
|| newSelStart != newSelEnd);
|
|
||||||
final int moveAmount = newSelStart - oldSelStart;
|
final int moveAmount = newSelStart - oldSelStart;
|
||||||
if (selectionChangedOrSafeToReset && (hasOrHadSelection
|
if (selectionChangedOrSafeToReset && (hasOrHadSelection
|
||||||
|| !mWordComposer.moveCursorByAndReturnIfInsideComposingWord(moveAmount))) {
|
|| !mWordComposer.moveCursorByAndReturnIfInsideComposingWord(moveAmount))) {
|
||||||
|
@ -246,8 +247,6 @@ public final class InputLogic {
|
||||||
mRecapitalizeStatus.deactivate();
|
mRecapitalizeStatus.deactivate();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* React to a code input. It may be a code point to insert, or a symbolic value that influences
|
* React to a code input. It may be a code point to insert, or a symbolic value that influences
|
||||||
|
|
Loading…
Reference in a new issue