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

Skip to content
Commit 2ba3e989 authored by Alexander Roederer's avatar Alexander Roederer
Browse files

Add bitmask to ZenRule tracking user changes

Modifies AutomaticZenRule/ZenModeConfig.ZenRule, ZenPolicy, and
ZenDeviceEffects to have a bitmask called userModifiedFields. This
bitmask is checked and updated in populateZenRule based on the values
that are modified whenever a ZenRule is Added or modified.

For the check: origins described in doesOriginAlwaysUpdateValues, and
rules that are not isUserModified (which checks if anything in the
bitmask is set) are allowed to update values.
For the bitmask update: UPDATE_ORIGIN_USER will update the bitmask.

The ZenPolicy and ZenDeviceEffects containers track their own bitmasks,
which impact the ultimate value of the top-level AZR.isUserModified.

Bug: 308671593
Bug: 308673679
Test: atest AutomaticZenRuleTest atest ZenPolicyTest atest ZenDeviceEffectsTest atest atest ZenModeConfigTest atest ZenModeHelperTest
Change-Id: I098950169b314266a3ade0855b6dafdc48a60229
parent 2d868874
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment