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

Commit 826e5c01 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "camera2 ndk: Allow nullptr for...

Merge "camera2 ndk: Allow nullptr for ACameraCaptureSession_captureCallbacks.onClosed." into qt-qpr1-dev am: 9ed54cdf

Change-Id: Iaa243598cb9f5eefd3721413f016c7f18fc76ea6
parents 32034f17 9ed54cdf
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -33,7 +33,9 @@ ACameraCaptureSession::~ACameraCaptureSession() {
        dev->unlockDevice();
        dev->unlockDevice();
    }
    }
    // Fire onClosed callback
    // Fire onClosed callback
    if (mUserSessionCallback.onClosed != nullptr) {
        (*mUserSessionCallback.onClosed)(mUserSessionCallback.context, this);
        (*mUserSessionCallback.onClosed)(mUserSessionCallback.context, this);
    }
    ALOGV("~ACameraCaptureSession: %p is deleted", this);
    ALOGV("~ACameraCaptureSession: %p is deleted", this);
}
}


+2 −14
Original line number Original line Diff line number Diff line
@@ -253,21 +253,9 @@ class CameraHelper {
        return true;
        return true;
    }
    }


    static void onDeviceDisconnected(void* /*obj*/, ACameraDevice* /*device*/) {}

    static void onDeviceError(void* /*obj*/, ACameraDevice* /*device*/, int /*errorCode*/) {}

    static void onSessionClosed(void* /*obj*/, ACameraCaptureSession* /*session*/) {}

    static void onSessionReady(void* /*obj*/, ACameraCaptureSession* /*session*/) {}

    static void onSessionActive(void* /*obj*/, ACameraCaptureSession* /*session*/) {}

   private:
   private:
    ACameraDevice_StateCallbacks mDeviceCb{this, onDeviceDisconnected,
    ACameraDevice_StateCallbacks mDeviceCb{this, nullptr, nullptr};
                                           onDeviceError};
    ACameraCaptureSession_stateCallbacks mSessionCb{ this, nullptr, nullptr, nullptr};
    ACameraCaptureSession_stateCallbacks mSessionCb{
        this, onSessionClosed, onSessionReady, onSessionActive};


    native_handle_t* mImgReaderAnw = nullptr;  // not owned by us.
    native_handle_t* mImgReaderAnw = nullptr;  // not owned by us.