Camera: Pass metadataGetter from CameraDeviceClient
As part of HIDL->AIDL conversion, the metadataGetter has been changed
to use the mPhysicalCameraCharacteristics within the DeviceInfo3. But
for the case where a physical camera is a public available camera Id,
the lookup will fail.
Revert back to previous logic where the metadataGetter is based on
Camera3Device, which has knowledge of all physical camera's
characteristics.
Bug: 230337556
Test: Camera CTS, and vendor testing
Change-Id: I7aa349282b79f36b5dccedc86d037095c5b64f65
diff --git a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp
index 1f0e095..5db3fa6 100644
--- a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp
+++ b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp
@@ -721,8 +721,10 @@
}
*status = false;
+ camera3::metadataGetter getMetadata = [this](const String8 &id, bool /*overrideForPerfClass*/) {
+ return mDevice->infoPhysical(id);};
ret = mProviderManager->isSessionConfigurationSupported(mCameraIdStr.string(),
- sessionConfiguration, mOverrideForPerfClass, status);
+ sessionConfiguration, mOverrideForPerfClass, getMetadata, status);
switch (ret) {
case OK:
// Expected, do nothing.