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

Commit 3a85aca3 authored by Steve Kondik's avatar Steve Kondik Committed by Ricardo Cerqueira
Browse files

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
parent 7db68c9c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -720,6 +720,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);