diff options
author | Mihai Popa <popam@google.com> | 2018-05-21 15:34:16 +0100 |
---|---|---|
committer | Mihai Popa <popam@google.com> | 2018-05-21 18:58:03 +0100 |
commit | 6849bd32968e56a51b345ef8b3071335326483f9 (patch) | |
tree | 2c32cd8ad6dc6fdb785c9c7350bed6015a3d2433 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 12482a85593150ef68608133fd3cb9aeb23e390f (diff) |
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
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions