Improve SystemUIBootTiming performance in OneHandedController
Fix race condition in SystemUIBootTiming issue.
1. Avoid updateOneHandedEnabled() called twice during init
a. [O] come from setOneHandedEnabled()
b. [X] come from setSwipeToNotificationEnabled()
2. Passively waiting shortcut enabled changed callback, and then
query setting ACCESSIBILITY_BUTTON_TARGETS status.
3. Add a new flag isShortcutEnabled to cache shortcut enabled
state.
4. By new OHM Settings UX design setSwipeToNotificationEnabled()
should NOT setEnabledGesturalOverlay().
5. Remove redundant auto enabled Toast and print in log instead.
(In general case, user is not able to see the Toast)
Test: atest google/perf/boottime/boottime-test
Test: atest SystemUITests
Test: atest WMShellTests
Test: manual factory reboot, OHM should disabled by default
Bug: 192612924
Change-Id: I8b24c99bc8bd5bfb17c73a6bb8494109d9a8170d
3 files changed