summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2012-12-15 20:29:59 -0800
committerSteve Kondik <shade@chemlab.org>2012-12-15 20:31:26 -0800
commitb83e8c40add750ff99afda98c9df0a2baf93b99e (patch)
tree782e192c1b1707d4ee9fa74df0efd621509a3db0 /services
parent87dc005928a231a6809a588ae84ed98e0313b170 (diff)
downloadframeworks_av-b83e8c40add750ff99afda98c9df0a2baf93b99e.zip
frameworks_av-b83e8c40add750ff99afda98c9df0a2baf93b99e.tar.gz
frameworks_av-b83e8c40add750ff99afda98c9df0a2baf93b99e.tar.bz2
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
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/CameraClient.cpp6
1 files changed, 6 insertions, 0 deletions
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);