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

Skip to content
Commit 0f01c849 authored by Doris Ling's avatar Doris Ling
Browse files

Only register conditions receiver when needed.

1. Update the dnd receiver to listen when dashboard summary running.
- remove the dnd receiver from Android manifest, and create it inside
the dnd condition.
- add lifecycle implementation to condition manager, so that the dnd
condition can know when to register and unregister the receiver.
- remove getReceiverClass() from dnd condition so that its receiver will
not be disabled by the default condition handling when condition is
silenced.

2. Remove all other conditions receiver from Android manifest.
- the broadcast receivers for HotspotCondition, AirplaneModeCondition,
CellularDataCondition from the manifest and create them inside the
condition classes.
- update Condition.onSilenceChanged() to register/unregister the
receivers instead of enable/disable the receiver class.

Change-Id: Iea6288382680df2b02884d1934b8db85daae404c
Fix: 35968517
Test: make RunSettingsRoboTests
parent 0f1d2bb8
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