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

Commit 65382f6a authored by Tang Lee's avatar Tang Lee
Browse files

Fix external camera HAL crashes

External USB camera hal service crashes when disconnecting the camera.
ExternalCameraDeviceSession's desctructor is called and deletes mLock,
but mBufferRequestThread is still running and waiting on the same
mLock, which causes the "pthread_mutex_lock called on a destroyed
mutex" error.

Fix the issue by stopping the thread in destructor. Also refactors the
functions and remove unused conditions.

Bug: 289741662
Test: Test with USB camera
Change-Id: I06b1ff6e192a4bca16822785d65d68a6aae53414
parent c350401b
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