Camera: Add default implementation of camera.device@3.3
Inherit as much as possible from camera.device@3.2
- Refactor CameraDeviceSession@3.2 implementation to separate out the
HIDL session interface from the main implementation object. This
avoids multiple inheritance issues
- Create CameraDeviceSession@3.3 with support for the new
overrideDataspace field
- Add virtual factory method for CameraDevice to create the right version
of Session.
- Create CameraDevice@3.3, which overrides createSession to return a
CameraDeviceSession@3.3.
- Add system property to override selection of which minor HIDL
version is used for legal HAL version 3.x; set the default to the
newest available minor version.
Test: Camera CTS passes on device using @3.3.
Bug: 62358514
Change-Id: I497e4bc0de798b56ecdb2ea6467b79afccaf89f7
diff --git a/camera/provider/2.4/default/CameraProvider.h b/camera/provider/2.4/default/CameraProvider.h
index 75971fa..4980711 100644
--- a/camera/provider/2.4/default/CameraProvider.h
+++ b/camera/provider/2.4/default/CameraProvider.h
@@ -82,6 +82,8 @@
// (cameraId string, hidl device name) pairs
SortedVector<std::pair<std::string, std::string>> mCameraDeviceNames;
+ int mPreferredHal3MinorVersion;
+
// Must be queried before using any APIs.
// APIs will only work when this returns true
bool mInitFailed;
@@ -91,13 +93,13 @@
bool setUpVendorTags();
int checkCameraVersion(int id, camera_info info);
+ // create HIDL device name from camera ID and legacy device version
+ std::string getHidlDeviceName(std::string cameraId, int deviceVersion);
+
// extract legacy camera ID/device version from a HIDL device name
static std::string getLegacyCameraId(const hidl_string& deviceName);
static int getCameraDeviceVersion(const hidl_string& deviceName);
- // create HIDL device name from camera ID and device version
- static std::string getHidlDeviceName(std::string cameraId, int deviceVersion);
-
// convert conventional HAL status to HIDL Status
static Status getHidlStatus(int);