summaryrefslogtreecommitdiff
path: root/api/coverage/tools
diff options
context:
space:
mode:
author Matías Hernández <matiashe@google.com> 2024-10-29 20:30:38 +0100
committer Matías Hernández <matiashe@google.com> 2024-10-30 09:11:19 +0000
commit8b8e208b72d0a486b0d9f93703c03bd732f983c5 (patch)
tree0a4c81ac8c2250f112f0394f895bafce663852d1 /api/coverage/tools
parentf76196eb29f1752a7979a40d698b31ccf9278172 (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 'api/coverage/tools')
0 files changed, 0 insertions, 0 deletions