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

Skip to content
Commit 5ba40657 authored by Evan Severson's avatar Evan Severson
Browse files

Make SensorToggleControllers lifecycle aware

We need to watch the lifecycle so that we can unregister callbacks and
not cause leaks.

This change also rewrites the SensorPrivacyManagerHelper. The previous
implmementation was using deprecated apis. It also had an issue where
if a callback was added it would not necessarily register alistener with
the callback with the service since that was only done when the value is
checked. Now we register a listener when the class is instantiated and
with the new API there will only be the 1.

Finally we impove the tests to have more coverage and test both
SensorToggleControllers and the SensorPRivacyManagerHelper class.

Test: Use profiler to verify no more leaks
      SensorToggleControllerTest, SensorPrivacyManagerHelperTest
Bug: 244280065
Change-Id: Ibf0bcee455444a104ca6800302907c3dc0de8f1f
parent 1051fb16
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