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

Skip to content
Commit 1646c3ce authored by Eino-Ville Talvala's avatar Eino-Ville Talvala
Browse files

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
parent 2a7630de
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