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

Skip to content
Commit bf3ce30a authored by lumark's avatar lumark
Browse files

Skip deleteSurroundingText when there is an invalid selection

Since InputConnection#deleteSurroundingText the design is to delete the
text before the selection start and after the selection end range,

it would be possible that the exception may happened when the obsolete
selection range which is not aligned with the current text content.

Add a check to make sure the text will be deleted when the number of
text before / selection the selection is > 0.

Also, skip the delection when the selection is not yet attached

Bug: 130979263
Test: atest BaseInputConnectionTest
Change-Id: I93b69b71531bcab4ae204c1c1287b8fbe0224ea8
parent a96a64fa
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