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

Change-Id: I33107fb888e664a1d80fba26dd8645991863115e
gugelfrei
Automerger Merge Worker 5 years ago
commit 1f338c87f8

@ -33,7 +33,9 @@ ACameraCaptureSession::~ACameraCaptureSession() {
dev->unlockDevice(); dev->unlockDevice();
} }
// Fire onClosed callback // Fire onClosed callback
(*mUserSessionCallback.onClosed)(mUserSessionCallback.context, this); if (mUserSessionCallback.onClosed != nullptr) {
(*mUserSessionCallback.onClosed)(mUserSessionCallback.context, this);
}
ALOGV("~ACameraCaptureSession: %p is deleted", this); ALOGV("~ACameraCaptureSession: %p is deleted", this);
} }

@ -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.

Loading…
Cancel
Save