Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1e5b9b4 authored by Jean Chalard's avatar Jean Chalard
Browse files

[IL80] Reverse a test for clarity.

Bug: 8636060
Change-Id: I5092942ab4fd6aaf37023083040cadbc18583fd1
parent f5948737
Loading
Loading
Loading
Loading
+49 −50
Original line number Diff line number Diff line
@@ -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