From b83e8c40add750ff99afda98c9df0a2baf93b99e Mon Sep 17 00:00:00 2001 From: Steve Kondik Date: Sat, 15 Dec 2012 20:29:59 -0800 Subject: camera: Ignore CAF_RESTART callbacks * Ignore these callbacks which are sent by Samsung camera drivers, as they can cause a deadlock in normal operation. Change-Id: Iae59eb0d3050751c1a4d372c80d430a8ba957252 --- services/camera/libcameraservice/CameraClient.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'services') diff --git a/services/camera/libcameraservice/CameraClient.cpp b/services/camera/libcameraservice/CameraClient.cpp index 669c3b5..6be7403 100644 --- a/services/camera/libcameraservice/CameraClient.cpp +++ b/services/camera/libcameraservice/CameraClient.cpp @@ -713,6 +713,12 @@ void CameraClient::notifyCallback(int32_t msgType, int32_t ext1, int32_t ext2, void* user) { LOG2("notifyCallback(%d)", msgType); + // Ignore CAF_RESTART callbacks from Samsung's camera driver + if (msgType == CAMERA_MSG_FOCUS && ext1 == 4) { + LOG2("Ignore CAF_RESTART callback"); + return; + } + Mutex* lock = getClientLockFromCookie(user); if (lock == NULL) return; Mutex::Autolock alock(*lock); -- cgit v1.1