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
Loading
Please register or sign in to comment