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
Loading
Please register or sign in to comment