Accessibility should not query for list items when data set changed.
AbsListView is backed by an adapter. After the adapter data changes the view sets a flag that its state is dirty and requests a layout. If an accessibility service asks for the state of a list item at this point, it may incur an error since the views and the adapter are not in sync. Now if an accessibility service queries for a list item when the data set is changed and the item views are dirty, we pretend the children do not exist. After the layout happens, we notify the accessibility layer that the screen content changed so it can refetch the views if desired (this notification mechanism is already in place in AbsListView#handleDataChanged()). bug:8433433 Change-Id: I4287a0ac2ef6bb33f1f988d5ddad973556c305ca
Loading
Please register or sign in to comment