Skip to content
Commit 6849bd32 authored by Mihai Popa's avatar Mihai Popa
Browse files

Cheaper crash check post smart selection animation

At the end of the smart selection animation, we run a callback that sets
the selection on the TextView (subsequently starting the action mode
toolbar and showing the handles). However, when the text changes before
the animation finishes, the selection might not be valid, and might get
out of the text bounds, which was producing a crash.

This was initially fixed in Iea043f320004d45ad16dd7e9e5b47e5256e6d9fa,
by checking whether the text has not changed since the animation
started. The fix was implying one text copy and a potentially full text
comparison, being unnecessary costly. This CL instead only checks
whether the selection is still within the text bounds when animation
ends.

Bug: 69919777
Test: manual testing before and after the fix
Change-Id: Id65443e93d277c106ea955c867d39e94192cc55d
parent 12482a85
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment