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

Commit 9b739de4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't run Smart Select Animation on multiple lines"

parents c11b5996 855396d3
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -200,6 +200,17 @@ final class SelectionActionModeHelper {
        final List<RectF> selectionRectangles =
                convertSelectionToRectangles(layout, result.mStart, result.mEnd);

        /*
         * Do not run the Smart Select animation when there are multiple lines involved, as this
         * behavior is currently broken.
         *
         * TODO fix Smart Select Animation when the selection spans multiple lines
         */
        if (selectionRectangles.size() != 1) {
            onAnimationEndCallback.run();
            return;
        }

        /*
         * TODO Figure out a more robust approach for this
         * We have to translate all the generated rectangles by the top-left padding of the