Skip to content
Commit a9ddb1e0 authored by Joanne Chung's avatar Joanne Chung
Browse files

Fix IndexOutOfBoundsException when calling dispatchProvideStructure()

dispatchProvideStructure() will get preorderedList by buildOrderedChildList().
buildOrderedChildList() returns mPreSortedChildren directly. During
the traversal, the mPreSortedChildren is changed by the
View#populateAccessibilityNodeInfoDrawingOrderInParent(). When one of
child traversal is done, the preorderedList is already changed, the
IndexOutOfBoundsException will occurr when trying to travese the next
child.

To fix it, try to make a copy not directly refer to mPreSortedChildren.
Bug: 185971133
Test: manual. App doesn't crash
Test: atest CtsAutoFillServiceTestCases
Change-Id: Ie077948dd45426c1204d153ca0a921c7c67351d8
parent ee156a8c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment