OSDN Git Service

Ensure to reset state of selecting by word/char for new selections
authorMady Mellor <madym@google.com>
Fri, 22 May 2015 17:31:12 +0000 (10:31 -0700)
committerRoozbeh Pournader <roozbeh@google.com>
Wed, 3 Jun 2015 19:53:52 +0000 (19:53 +0000)
commit36d5a7b22500ec8c3d754e9caf1728dda168ad92
tree4ffefb06d4308fbb62e1932b4108282467a365e9
parent59845bef8e66c278c728744785852b8799d832fc
Ensure to reset state of selecting by word/char for new selections

Previously this value was only updated when interacting with the
selection handles, so if you started a selection, entered by-char mode,
and then started another selection you would still be in by-char mode.
This resulted in incorrect behavior.

This CL alters the logic to update the handle state whenever the cursor
is placed which will included the initial long press to select a word.

Bug: 21301589
Change-Id: I15dbe6f2b76c7edd8ea4b3ba53e7107c47bc48fa
core/java/android/widget/Editor.java