diff options
author | Zhijun He <zhijunhe@google.com> | 2014-03-26 18:18:00 -0700 |
---|---|---|
committer | Zhijun He <zhijunhe@google.com> | 2014-03-27 01:24:52 +0000 |
commit | 95dd5ba5bf83716f2eed5fe72366c4212464d710 (patch) | |
tree | eb079faddf0fac3f259b9529f4171081105cf2db /services/camera/libcameraservice/device3 | |
parent | ecdca392ed40e89a6ef14b86446e952c35497ac4 (diff) | |
download | frameworks_av-95dd5ba5bf83716f2eed5fe72366c4212464d710.zip frameworks_av-95dd5ba5bf83716f2eed5fe72366c4212464d710.tar.gz frameworks_av-95dd5ba5bf83716f2eed5fe72366c4212464d710.tar.bz2 |
Camera3: fix HAL3.x version check issue
Camera service should support HAL3.x instead of only HAL3.0.
Bug: 13609405
Change-Id: If7e86f9abe019547fc0be2e11337551cd7c57870
Diffstat (limited to 'services/camera/libcameraservice/device3')
-rw-r--r-- | services/camera/libcameraservice/device3/Camera3Device.cpp | 6 | ||||
-rw-r--r-- | services/camera/libcameraservice/device3/Camera3Device.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp index 51dcb89..f586e75 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.cpp +++ b/services/camera/libcameraservice/device3/Camera3Device.cpp @@ -114,9 +114,9 @@ status_t Camera3Device::initialize(camera_module_t *module) /** Cross-check device version */ - if (device->common.version != CAMERA_DEVICE_API_VERSION_3_0) { + if (device->common.version < CAMERA_DEVICE_API_VERSION_3_0) { SET_ERR_L("Could not open camera: " - "Camera device is not version %x, reports %x instead", + "Camera device should be at least %x, reports %x instead", CAMERA_DEVICE_API_VERSION_3_0, device->common.version); device->common.close(&device->common); @@ -130,7 +130,7 @@ status_t Camera3Device::initialize(camera_module_t *module) if (info.device_version != device->common.version) { SET_ERR_L("HAL reporting mismatched camera_info version (%x)" " and device version (%x).", - device->common.version, info.device_version); + info.device_version, device->common.version); device->common.close(&device->common); return BAD_VALUE; } diff --git a/services/camera/libcameraservice/device3/Camera3Device.h b/services/camera/libcameraservice/device3/Camera3Device.h index 7ea8bcf..ed58246 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.h +++ b/services/camera/libcameraservice/device3/Camera3Device.h @@ -54,7 +54,7 @@ class Camera3StreamInterface; } /** - * CameraDevice for HAL devices with version CAMERA_DEVICE_API_VERSION_3_0 + * CameraDevice for HAL devices with version CAMERA_DEVICE_API_VERSION_3_0 or higher. */ class Camera3Device : public CameraDeviceBase, |