Camera: Mark camera HAL device v2.x as unsupported
Device HAL v2.x is obsolete, and no devices using it are still
supported. Mark it unsupported, and clean up native tests.
Bug: 25866588
Change-Id: I8e0f1448b8ae0eaaf3714f2351746af46c7657a7
diff --git a/tests/camera2/CameraModuleFixture.h b/tests/camera2/CameraModuleFixture.h
index 3a2df69..661c693 100644
--- a/tests/camera2/CameraModuleFixture.h
+++ b/tests/camera2/CameraModuleFixture.h
@@ -23,7 +23,6 @@
#include "hardware/camera2.h"
#include <common/CameraModule.h>
-#include <device2/Camera2Device.h>
#include <device3/Camera3Device.h>
#include "camera2_utils.h"
@@ -92,14 +91,10 @@
struct camera_info info;
ASSERT_EQ(OK, mModule->getCameraInfo(cameraID, &info));
- ASSERT_GE((int)info.device_version, CAMERA_DEVICE_API_VERSION_2_0) <<
+ ASSERT_GE((int)info.device_version, CAMERA_DEVICE_API_VERSION_3_0) <<
"Device version too old for camera " << cameraID << ". Version: " <<
info.device_version;
switch(info.device_version) {
- case CAMERA_DEVICE_API_VERSION_2_0:
- case CAMERA_DEVICE_API_VERSION_2_1:
- *device = new Camera2Device(cameraID);
- break;
case CAMERA_DEVICE_API_VERSION_3_0:
case CAMERA_DEVICE_API_VERSION_3_1:
case CAMERA_DEVICE_API_VERSION_3_2:
diff --git a/tests/camera2/CameraMultiStreamTests.cpp b/tests/camera2/CameraMultiStreamTests.cpp
index 3e29ad6..eb64db1 100644
--- a/tests/camera2/CameraMultiStreamTests.cpp
+++ b/tests/camera2/CameraMultiStreamTests.cpp
@@ -495,9 +495,6 @@
jpegData = availableJpegSizes.data.i32;
jpegCount = availableJpegSizes.count;
} else {
- const int32_t *implDefResolutions;
- size_t implDefResolutionsCount;
-
getResolutionList(HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, &implDefData, &implDefCount);
ASSERT_NE(0u, implDefCount)
<< "Missing implementation defined sizes";
diff --git a/tests/camera2/CameraStreamFixture.h b/tests/camera2/CameraStreamFixture.h
index fc5fb36..bf7fb42 100644
--- a/tests/camera2/CameraStreamFixture.h
+++ b/tests/camera2/CameraStreamFixture.h
@@ -186,7 +186,6 @@
void getResolutionList(int32_t format,
const int32_t **list,
size_t *count) {
- status_t res;
ALOGV("Getting resolutions for format %x", format);
if (getDeviceVersion() < CAMERA_DEVICE_API_VERSION_3_2) {
return;
diff --git a/tests/camera2/CameraStreamTests.cpp b/tests/camera2/CameraStreamTests.cpp
index a3b8c47..de9ae8a 100644
--- a/tests/camera2/CameraStreamTests.cpp
+++ b/tests/camera2/CameraStreamTests.cpp
@@ -29,8 +29,6 @@
#include <gui/CpuConsumer.h>
#include <gui/Surface.h>
-#include <device2/Camera2Device.h>
-
#include "CameraStreamFixture.h"
#include "TestExtensions.h"