packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/FlashlightControllerImplTest.kt
0 → 100644
+144
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
Move all interactions with the CameraManager to a background thread. This makes initialization async, but it's ok as we will be initialized to the correct state (and that will be propagated) once we register the TorchCallback. For now, we call init in the constructor, but a refactor will happen to move this to a better call point. Also, remove optimistically setting the state of mFlashlightEnabled when setting it. Instead, make sure that we always reflect the device state by only changing it from the callback. Test: manual Test: atest FlashlightControllerImpl Fixes: 233870137 Change-Id: I9100c9101429f2dc840c6708ad3115a4eab6ab4b