diff options
| author | 2024-10-29 20:30:38 +0100 | |
|---|---|---|
| committer | 2024-10-30 09:11:19 +0000 | |
| commit | 8b8e208b72d0a486b0d9f93703c03bd732f983c5 (patch) | |
| tree | 0a4c81ac8c2250f112f0394f895bafce663852d1 /libs/androidfw/AttributeResolution.cpp | |
| parent | f76196eb29f1752a7979a40d698b31ccf9278172 (diff) | |
Fix user attribution of zen-related calls into NM/ZenModeHelper
Previously, any API calls would operate on the ZenModeConfig for the current user, even if the call was coming for a package runing on a background user. With this change, every call either specifies a specific user (calculated from the Binder caller) or explicitly indicates that it's supposed to work on the current configuration.
The only methods in ZenModeHelper that still access mConfig directly are:
* intialization-related ones
* setConfigLocked and callees (evaluateZenModeLocked, etc)
* loadConfigForUser and callees (cleanUpZenRules, etc)
* dump/metric-collecting methods (bugreports, etc)
* methods called internally by the system (such as ringer-related stuff)
Note that computed zen state and computed consolidated policy are still global, so background users who call setInterruptionFilter/setAutomaticZenRuleState will not observe them changing (until we switch back to that user). This is intended behavior because Zen isn't actually applied for them, in practice.
Bug: 323163267
Test: atest ZenModeHelperTest + manually
Flag: android.app.modes_multiuser
Change-Id: Id624f8b64ab016406694d9a5af629223ba2c84de
Diffstat (limited to 'libs/androidfw/AttributeResolution.cpp')
0 files changed, 0 insertions, 0 deletions