diff options
author | Igor Murashkin <iam@google.com> | 2013-07-12 17:52:16 -0700 |
---|---|---|
committer | Igor Murashkin <iam@google.com> | 2013-07-15 13:27:08 -0700 |
commit | 099b457f3203fa51387e21bd450495abb973ab31 (patch) | |
tree | 25c6a2d84c5020575cbf2d40f2fbf60107e5c162 /services/camera | |
parent | ce177bb31493d3cd4450f9d4760fa1fd32ec6bf4 (diff) | |
download | frameworks_av-099b457f3203fa51387e21bd450495abb973ab31.zip frameworks_av-099b457f3203fa51387e21bd450495abb973ab31.tar.gz frameworks_av-099b457f3203fa51387e21bd450495abb973ab31.tar.bz2 |
camera2: Implement ICameraDeviceUser::getCameraInfo
Bug: 9529161
Change-Id: I927e39c124cd5fb19e38423506f4463acc381cb0
Diffstat (limited to 'services/camera')
-rw-r--r-- | services/camera/libcameraservice/photography/CameraDeviceClient.cpp | 15 | ||||
-rw-r--r-- | services/camera/libcameraservice/photography/CameraDeviceClient.h | 4 |
2 files changed, 6 insertions, 13 deletions
diff --git a/services/camera/libcameraservice/photography/CameraDeviceClient.cpp b/services/camera/libcameraservice/photography/CameraDeviceClient.cpp index bd6b60a..a6a2dc1 100644 --- a/services/camera/libcameraservice/photography/CameraDeviceClient.cpp +++ b/services/camera/libcameraservice/photography/CameraDeviceClient.cpp @@ -391,28 +391,23 @@ status_t CameraDeviceClient::createDefaultRequest(int templateId, return res; } -status_t CameraDeviceClient::getCameraInfo(int cameraId, - /*out*/ - camera_metadata** info) +status_t CameraDeviceClient::getCameraInfo(/*out*/CameraMetadata* info) { ATRACE_CALL(); ALOGV("%s", __FUNCTION__); status_t res = OK; - // TODO: remove cameraId. this should be device-specific info, not static. - if (cameraId != mCameraId) { - return INVALID_OPERATION; - } - if ( (res = checkPid(__FUNCTION__) ) != OK) return res; Mutex::Autolock icl(mBinderSerializationLock); if (!mDevice.get()) return DEAD_OBJECT; - CameraMetadata deviceInfo = mDevice->info(); - *info = deviceInfo.release(); + if (info != NULL) { + *info = mDevice->info(); // static camera metadata + // TODO: merge with device-specific camera metadata + } return res; } diff --git a/services/camera/libcameraservice/photography/CameraDeviceClient.h b/services/camera/libcameraservice/photography/CameraDeviceClient.h index 806aa15..c6c241a 100644 --- a/services/camera/libcameraservice/photography/CameraDeviceClient.h +++ b/services/camera/libcameraservice/photography/CameraDeviceClient.h @@ -85,9 +85,7 @@ public: // Get the static metadata for the camera // -- Caller owns the newly allocated metadata - virtual status_t getCameraInfo(int cameraId, - /*out*/ - camera_metadata** info); + virtual status_t getCameraInfo(/*out*/CameraMetadata* info); /** * Interface used by CameraService |