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

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

Remove long unused (and non-user-modified) implicit ZenRules

We now track the last time each ZenRule was activated. On ZenModeConfig load (e.g. reboot, user switch) if 30 days have passed since the last activation of an implicit rule, it is deleted. For rules created before we started tracking activation, we also set lastActivation=now -- in essence, so that we wait 30 days before deciding whether they are actually used or not.

As a side-change, rename ZenRule.canBeUpdatedByApp() to ZenRule.isUserModified(), inverting is logic. The latter is the condition that almost all callsites are interested in.

Bug: 394087495
Test: atest ZenModeConfigTest ZenModeHelperTest
Flag: android.app.modes_cleanup_implicit
Change-Id: If9f7916e59b47871f14bd4b1b4efaf6cd2d41af7
parent 6dd098ac
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