[IL80] Reverse a test for clarity.

Bug: 8636060
Change-Id: I5092942ab4fd6aaf37023083040cadbc18583fd1
This commit is contained in:
Jean Chalard 2014-01-24 14:09:42 +09:00
parent f59487379e
commit f1e5b9b4d1

View file

@ -195,7 +195,9 @@ public final class InputLogic {
final int oldSelStart, final int oldSelEnd,
final int newSelStart, final int newSelEnd,
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().
// 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
@ -216,8 +218,7 @@ public final class InputLogic {
// TODO: is it still necessary to test for composingSpan related stuff?
final boolean selectionChangedOrSafeToReset = selectionChanged
|| (!mWordComposer.isComposingWord()) || noComposingSpan;
final boolean hasOrHadSelection = (oldSelStart != oldSelEnd
|| newSelStart != newSelEnd);
final boolean hasOrHadSelection = (oldSelStart != oldSelEnd || newSelStart != newSelEnd);
final int moveAmount = newSelStart - oldSelStart;
if (selectionChangedOrSafeToReset && (hasOrHadSelection
|| !mWordComposer.moveCursorByAndReturnIfInsideComposingWord(moveAmount))) {
@ -246,8 +247,6 @@ public final class InputLogic {
mRecapitalizeStatus.deactivate();
return true;
}
return false;
}
/**
* React to a code input. It may be a code point to insert, or a symbolic value that influences