Fixing the accessibility text traversal in extend mode (CTS).

We added APIs to allow an accessibility service to extend the
selection while moving the cursor at a given granularity such
as word, character, etc. The problem is that the traversal was
extending only the end of the selection while moving forward
and the start of the selection while moving backward. This leads
to a case in which the user cannot shrink/extend the selection
because for example instead of shrinking the end of the selection
the implementation was extending the start.

Now extending the selection moves only the selection end. This is
the same behavior as text view using a keyboard.

Main change: https://googleplex-android-review.googlesource.com/#/c/307058

bug:8839844

Change-Id: I0d3b729e2de71cad66ffac319a591ac64f1a2e84
1 file changed