Camera: Fix deadlock when querying for camera muting support
Camera3Device::RequestThread can call into Camera3Device::supportsCameraMute() while Camera3Device::waitUntilDrained() is waiting for requestThread to drain the camera request queue, while holding the same lock that supportsCameraMute needs to acquire. This leads to a deadlock since RequestThread can't make forward progress while waitUntilDrained is waiting for it to complete. Refactor code to pass in supportsCameraMute into RequestThread's constructor so it can be referenced within RequestThread without querying Camera3Device. Test: atest CtsCameraTestCases on coral manual verification with TestingCamera2 on cuttlefish Bug: 194765122 Change-Id: Ie9713af6961d3e085d898f351b9b1f1b6d9fdfb0
Loading
Please register or sign in to comment