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

Skip to content
Commit d55c7a5e authored by Bharatt Kukreja's avatar Bharatt Kukreja
Browse files

Mark a component as idle before reconfigure camera is called

reconfigureCamera is currently responsible for marking a component as
idle. This can pose problems when we are in a state where we are waiting
for a component to be marked as idle (for eg in createInputStream) and
also hold the locks that reconfigureCamera needs to execute. In this
case, CreateInputStream will end up waiting forever as reconfigureCamera
cannot be executed.

Instead mark a component as idle directly in the threadLoop before
calling reconfigureCamera.

Bug: 241137777
Test: Existing tests pass. Very difficult to create a scenario in which
we could test this, but this fix handles the theoretical scenario that a
vendor actually stumbled upon. A component never became idle and the
control couldn't exist createInputStream as it occupied both mLock and
mInterfaceLock needed by reconfigureCamera.

Change-Id: I9b0beacf1de5f70671c8e8b522e80ea5c3f02fe3
parent ad0fe922
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