diff options
| author | 2024-11-14 18:47:51 +0000 | |
|---|---|---|
| committer | 2024-11-15 14:41:40 +0000 | |
| commit | 623953d5e39b0f1258f777f674242c103a17d376 (patch) | |
| tree | 5ed75c7e2ef607b7a272e3811a6435bb20e71cd4 /libs/androidfw/StringPool.cpp | |
| parent | d984fd621ea94b1fba78cd647ec94fa1ec140d88 (diff) | |
Don't apply overrides to implicit rules, instead just update their conditions
Implicit rules are not known to the owning package, which just calls setInterruptionFilter(). Thus, a "stray" call to setInterruptionFilter(PRIORITY) without a corresponding "ALL" afterwards would leave the rule with a STATE_TRUE condition. And because a manual deactivation is not saved to storage, the rule would reactivate on each reboot.
Instead, when toggling one of these rules for whatever reason (including manually), just overwrite its condition instead. This behavior is also closer to the pre-MODES behavior, since manual DND was never itself snoozed.
Fixes: 379112535
Test: atest ZenModeHelperTest
Flag: android.app.modes_ui
Change-Id: I224b741f56bd5bc1ce71a5688622b8638530b92d
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions