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
Loading
Please register or sign in to comment