Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b8420d6c authored by Chun-Ku Lin's avatar Chun-Ku Lin
Browse files

Clear cached QS Targets and A11yTilesInQsPanel when switch user

SysUI grab a list of a11y tiles by calling AccessibilityManager, which
might return an incomplete list of a11y tiles while the packagemanager is
sending package changed broadcasts.

If we cached the A11yTilesInQsPanel, it won't always match the one sent
by SysUI when switch user.

For example, ReadingModeTile is in QS Panel before switch to guest user.
When we switch the guest user back to the owner user, the sysui still
keep the ReadingModeTile in QS Panel, but when it notify
AccessibilityManager tiles changed, it didn't include ReadingModeTile as
one of the a11y tile in QS Panel, because
AccessibilityManager#getInstalledAccessibilityServiceList says
ReadingMode is not one of the installed service.

Cleaning the cached qs targets and a11yTilesInQsPanel when switch users,
so that we don't accidentally remove a11y QS tiles when switch back.

Bug: 348237695 (comment#20)
Test: atest AccessibilityUserStateTest
Test: manually
- Turn on Reading Mode with QS tile as Owner User
- Enable multiple user, switch to guest user
- Switch back to owner user
- Verify Reading Mode tile persist in QS Panel
Flag: EXEMPT bugfix low risk

Change-Id: Ic0cc5cec22777d787da5fe187825e49a1c2dfa26
parent 5627a898
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