summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorJoanne Chung <joannechung@google.com>2020-03-23 22:40:14 +0800
committerJoanne Chung <joannechung@google.com>2020-04-16 17:37:05 +0800
commitcb3c97db0cf21df076735d71c573a754fa4ef072 (patch)
tree10bfb10a54170b13cfaba75f274f73ed36d059b3 /tools/aapt2/java/JavaClassGenerator.cpp
parent82dc6147f16edc2106d509f97157bbc0c53a1ea4 (diff)
Fix app crash if the selection is from reverse direction.
When user types some text and then long presses on end of empty area to open context menu, if user opens Gboard and selects text from the reverse direction, SelectionEnd will be less than SelectionStart. The IllegalArgumentException occurred because TextClassification does not allow SelectionEnd is less than SelectionStart. We swap the start and end index if end index is less than start index. Bug: 150916165 Test: Manual. No crash occurs. Test: atest FrameworksCoreTests:android.widget.TextViewActivityTest Change-Id: I8dbc92f0f31e64b7e3a45ae91762e1b741629a8e
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions