Cache accessibility info in NavBarHelper to reduce binder calls
- Currently, we make two binder calls whenever the sysui state changes
to fetch the current accessibility info. Instead we can use the
AccessibilityButtonTargetsObserver to listen for the changes and
only update the accessibility state when it changes.
Bug: 201633154
Test: Enable/disable accessibility services and verify button shows
Enable/disable > 1 accessibility services and verify that
button is long-clickable to show the services menu
Verify both of the above with gesture nav & accessibility service
as well
Change-Id: I84a7d20040c61ea75ac0b9e1f790f4a8b0ebe398
5 files changed