Fix problem with ListView accessibility focus
A scrap view was retaining accessibility focus, leading to
a confusing experience for screen reader users.
Part of the problem is that views can change even when the
adapter has stable ids. This change tightens the condition
for restoring a11y focus to the same view.
AbsListView also allowed scrap views to maintain a11y focus.
While this may make sense if the views will be reused, it is
wrong if the views are not reused.
Bug: 29403113
Test: Verified that a11y focus stays put when toggling the
preference: Settings -> System -> Language & input ->
Virtual keyboards -> Advanced -> Symbol for physical keyboard
Change-Id: Ie4a15027088f158d9ed4bb3f3eeff5a288c25832
(cherry picked from commit ab4717aa2a7d0e19f4b08b2c851a541f9b0c9c6b)
2 files changed