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
Loading
Please register or sign in to comment