Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 623953d5 authored by Matías Hernández's avatar Matías Hernández
Browse files

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
parent d984fd62
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment