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

Commit 3b88884d authored by Mihai Popa's avatar Mihai Popa Committed by android-build-merger
Browse files

Merge "Fix monkey crash in smart selection animation" into pi-dev

am: 1ffdec20

Change-Id: Idbc82d56568d65542d189c84954c3c3f7cd7aea9
parents 5116500c 1ffdec20
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -285,10 +285,14 @@ public final class SelectionActionModeHelper {
        final Layout layout = mTextView.getLayout();

        final Runnable onAnimationEndCallback = () -> {
            if (result.mStart >= 0 && result.mEnd <= getText(mTextView).length()
            final SelectionResult startSelectionResult;
            if (result != null && result.mStart >= 0 && result.mEnd <= getText(mTextView).length()
                    && result.mStart <= result.mEnd) {
                startSelectionActionMode(result);
                startSelectionResult = result;
            } else {
                startSelectionResult = null;
            }
            startSelectionActionMode(startSelectionResult);
        };
        // TODO do not trigger the animation if the change included only non-printable characters
        final boolean didSelectionChange =