summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/CameraService.cpp
diff options
context:
space:
mode:
authorZhijun He <zhijunhe@google.com>2014-03-26 18:18:00 -0700
committerZhijun He <zhijunhe@google.com>2014-03-27 01:24:52 +0000
commit95dd5ba5bf83716f2eed5fe72366c4212464d710 (patch)
treeeb079faddf0fac3f259b9529f4171081105cf2db /services/camera/libcameraservice/CameraService.cpp
parentecdca392ed40e89a6ef14b86446e952c35497ac4 (diff)
downloadframeworks_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/CameraService.cpp')
-rw-r--r--services/camera/libcameraservice/CameraService.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index e39f3f2..5c6f653 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -324,6 +324,8 @@ bool CameraService::isValidCameraId(int cameraId) {
case CAMERA_DEVICE_API_VERSION_2_0:
case CAMERA_DEVICE_API_VERSION_2_1:
case CAMERA_DEVICE_API_VERSION_3_0:
+ case CAMERA_DEVICE_API_VERSION_3_1:
+ case CAMERA_DEVICE_API_VERSION_3_2:
return true;
default:
return false;
@@ -519,6 +521,8 @@ status_t CameraService::connect(
case CAMERA_DEVICE_API_VERSION_2_0:
case CAMERA_DEVICE_API_VERSION_2_1:
case CAMERA_DEVICE_API_VERSION_3_0:
+ case CAMERA_DEVICE_API_VERSION_3_1:
+ case CAMERA_DEVICE_API_VERSION_3_2:
client = new Camera2Client(this, cameraClient,
clientPackageName, cameraId,
facing, callingPid, clientUid, getpid(),
@@ -605,6 +609,8 @@ status_t CameraService::connectPro(
case CAMERA_DEVICE_API_VERSION_2_0:
case CAMERA_DEVICE_API_VERSION_2_1:
case CAMERA_DEVICE_API_VERSION_3_0:
+ case CAMERA_DEVICE_API_VERSION_3_1:
+ case CAMERA_DEVICE_API_VERSION_3_2:
client = new ProCamera2Client(this, cameraCb, String16(),
cameraId, facing, callingPid, USE_CALLING_UID, getpid());
break;
@@ -683,6 +689,8 @@ status_t CameraService::connectDevice(
case CAMERA_DEVICE_API_VERSION_2_0:
case CAMERA_DEVICE_API_VERSION_2_1:
case CAMERA_DEVICE_API_VERSION_3_0:
+ case CAMERA_DEVICE_API_VERSION_3_1:
+ case CAMERA_DEVICE_API_VERSION_3_2:
client = new CameraDeviceClient(this, cameraCb, String16(),
cameraId, facing, callingPid, USE_CALLING_UID, getpid());
break;