OSDN Git Service

Fix crash due to reverse selection.
authorSeigo Nonaka <nona@google.com>
Thu, 25 Jun 2015 10:02:17 +0000 (19:02 +0900)
committerSeigo Nonaka <nona@google.com>
Thu, 25 Jun 2015 16:40:49 +0000 (01:40 +0900)
commit86d60cde91eb4216580fe9d1250dc27c17e86c70
tree976db252b6b9031d108ca8c2252acfaae7ef8d71
parentd4d802be39c67bf207bbb693d32c6a59c78ed3bb
Fix crash due to reverse selection.

Selection start can be bigger than selection end and this kind
of selection is generated by mouse selection at least from L MR1.

To fix and support SHARE button for this kind of selection,
getSelectedText need to invert selection start and selection end
when the selection start is bigger than selection end.

Bug: 22065979
Change-Id: Ide4ac41e3f59d256033aca004450712ca0bb0f03
core/java/android/widget/TextView.java