Loading services/camera/libcameraservice/device3/Camera3Device.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -2205,7 +2205,9 @@ void Camera3Device::internalUpdateStatusLocked(Status status) { } void Camera3Device::pauseStateNotify(bool enable) { Mutex::Autolock il(mInterfaceLock); // We must not hold mInterfaceLock here since this function is called from // RequestThread::threadLoop and holding mInterfaceLock could lead to // deadlocks (http://b/143513518) Mutex::Autolock l(mLock); mPauseStateNotify = enable; Loading Loading @@ -2782,7 +2784,9 @@ bool Camera3Device::reconfigureCamera(const CameraMetadata& sessionParams) { ATRACE_CALL(); bool ret = false; Mutex::Autolock il(mInterfaceLock); // We must not hold mInterfaceLock here since this function is called from // RequestThread::threadLoop and holding mInterfaceLock could lead to // deadlocks (http://b/143513518) nsecs_t maxExpectedDuration = getExpectedInFlightDuration(); Mutex::Autolock l(mLock); Loading Loading @@ -5498,6 +5502,9 @@ bool Camera3Device::RequestThread::updateSessionParameters(const CameraMetadata& bool Camera3Device::RequestThread::threadLoop() { ATRACE_CALL(); status_t res; // Any function called from threadLoop() must not hold mInterfaceLock since // it could lead to deadlocks (disconnect() -> hold mInterfaceMutex -> wait for request thread // to finish -> request thread waits on mInterfaceMutex) http://b/143513518 // Handle paused state. if (waitIfPaused()) { Loading Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +9 −2 Original line number Diff line number Diff line Loading @@ -2205,7 +2205,9 @@ void Camera3Device::internalUpdateStatusLocked(Status status) { } void Camera3Device::pauseStateNotify(bool enable) { Mutex::Autolock il(mInterfaceLock); // We must not hold mInterfaceLock here since this function is called from // RequestThread::threadLoop and holding mInterfaceLock could lead to // deadlocks (http://b/143513518) Mutex::Autolock l(mLock); mPauseStateNotify = enable; Loading Loading @@ -2782,7 +2784,9 @@ bool Camera3Device::reconfigureCamera(const CameraMetadata& sessionParams) { ATRACE_CALL(); bool ret = false; Mutex::Autolock il(mInterfaceLock); // We must not hold mInterfaceLock here since this function is called from // RequestThread::threadLoop and holding mInterfaceLock could lead to // deadlocks (http://b/143513518) nsecs_t maxExpectedDuration = getExpectedInFlightDuration(); Mutex::Autolock l(mLock); Loading Loading @@ -5498,6 +5502,9 @@ bool Camera3Device::RequestThread::updateSessionParameters(const CameraMetadata& bool Camera3Device::RequestThread::threadLoop() { ATRACE_CALL(); status_t res; // Any function called from threadLoop() must not hold mInterfaceLock since // it could lead to deadlocks (disconnect() -> hold mInterfaceMutex -> wait for request thread // to finish -> request thread waits on mInterfaceMutex) http://b/143513518 // Handle paused state. if (waitIfPaused()) { Loading