Skip to content
Commit acf90acf authored by dooyoung.hwang's avatar dooyoung.hwang Committed by Adrian Roos
Browse files

QS - Fix race condition in accessibility

When users try to open panel, initialization of accessibility is called
in Main Thread by this callstack.

at android.view.ViewGroup.buildOrderedChildList
at android.view.View.populateAccessibilityNodeInfoDrawingOrderInParent
at android.view.View.onInitializeAccessibilityNodeInfoInternal
at android.view.View.onInitializeAccessibilityNodeInfo
at android.view.View.createAccessibilityNodeInfoInternal
at android.view.View.createAccessibilityNodeInfo
at android.view.accessibility.AccessibilityRecord.setSource
...
at android.view.View.setFlags
at android.view.View.setVisibility
at com.android.systemui.qs.QSContainer.updateQsState
at com.android.systemui.qs.QSContainer.setExpanded
at com.android.systemui.statusbar.phone.NotificationPanelView.updateQsState

And another initialization is tried in QSTileHost Thread by this callstack.

at android.view.ViewGroup.buildOrderedChildList
at android.view.View.populateAccessibilityNodeInfoDrawingOrderInParent
at android.view.View.onInitializeAccessibilityNodeInfoInternal
at android.view.ViewGroup.onInitializeAccessibilityNodeInfoInternal
at android.view.View.onInitializeAccessibilityNodeInfo
at android.view.View.createAccessibilityNodeInfoInternal
at android.view.View.createAccessibilityNodeInfo
at android.view.accessibility.AccessibilityRecord.setSource
...
at android.view.View.announceForAccessibility
at com.android.systemui.qs.QSPanel.onAnnouncementRequested
at com.android.systemui.qs.QSTile.handleStateChanged

This race condition can cause crashes, because the same ArrayList
(mPreSortedChildren or mTempArrayList in ViewGroup) is modified by two
different thread.

Test : manual

Change-Id: I9e0ad1fef4be7dc378463c06d10854e0e4c5b3d6
Fixes: 33947140
(cherry picked from commit 1b006623)
parent 2f157c42
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment