Skip to content
Commit 32f8f25f authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Move CameraManager interactions to background

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
parent cb8c65fe
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