diff options
Diffstat (limited to 'services/camera/libcameraservice/api2')
-rw-r--r-- | services/camera/libcameraservice/api2/CameraDeviceClient.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp index 289ba06..f147c06 100644 --- a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp +++ b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp @@ -500,14 +500,12 @@ void CameraDeviceClient::onFrameAvailable(int32_t frameId, ATRACE_CALL(); ALOGV("%s", __FUNCTION__); - Mutex::Autolock icl(mBinderSerializationLock); - SharedCameraCallbacks::Lock l(mSharedCameraCallbacks); - - if (mRemoteCallback != NULL) { + // Thread-safe. No lock necessary. + sp<ICameraDeviceCallbacks> remoteCb = mRemoteCallback; + if (remoteCb != NULL) { ALOGV("%s: frame = %p ", __FUNCTION__, &frame); - mRemoteCallback->onResultReceived(frameId, frame); + remoteCb->onResultReceived(frameId, frame); } - } // TODO: move to Camera2ClientBase |