Verify rule ownership in setAutomaticZenRuleState
Implementation now matches API documentation -- apps can only activate/deactivate their own rules.
Also refactored applyGlobalZenModeAsImplicitZenRule slightly to remove repetition and call setAutomaticZenRuleStateLocked directly (doesn't need the rule ownership check since we already know it's the implicit rule for that package).
Fixes: 326199494
Test: atest ZenModeHelperTest NotificationManagerZenTest
Change-Id: I4efecaafb7798dc72bf0955c1b1604c92c8f27e8
2 files changed