Merge tag 'android-14.0.0_r31' into leaf-3.2
Android 14.0.0 Release 31 (AP1A.240405.002.A1)
* tag 'android-14.0.0_r31':
Fix VendorTagDescriptorCache::getTagType
Fix VendorTagId to be metadata_vendor_id_t
Change-Id: Iccb7a2c2c3b79b2075c2a72e1126e56f4a961a1d
diff --git a/camera/CameraMetadata.cpp b/camera/CameraMetadata.cpp
index 2e808d1..424923a 100644
--- a/camera/CameraMetadata.cpp
+++ b/camera/CameraMetadata.cpp
@@ -880,7 +880,7 @@
return OK;
}
-metadata_vendor_id_t CameraMetadata::getVendorId() {
+metadata_vendor_id_t CameraMetadata::getVendorId() const {
return get_camera_metadata_vendor_id(mBuffer);
}
diff --git a/camera/VendorTagDescriptor.cpp b/camera/VendorTagDescriptor.cpp
index fb26f83..c12a1a1 100644
--- a/camera/VendorTagDescriptor.cpp
+++ b/camera/VendorTagDescriptor.cpp
@@ -466,7 +466,7 @@
int VendorTagDescriptorCache::getTagType(uint32_t tag,
metadata_vendor_id_t id) const {
- int ret = 0;
+ int ret = -1;
auto desc = mVendorMap.find(id);
if (desc != mVendorMap.end()) {
ret = desc->second->getTagType(tag);
diff --git a/camera/include/camera/CameraMetadata.h b/camera/include/camera/CameraMetadata.h
index c56ee6d..2903dfb 100644
--- a/camera/include/camera/CameraMetadata.h
+++ b/camera/include/camera/CameraMetadata.h
@@ -245,7 +245,7 @@
/**
* Return the current vendor tag id associated with this metadata.
*/
- metadata_vendor_id_t getVendorId();
+ metadata_vendor_id_t getVendorId() const;
private:
camera_metadata_t *mBuffer;
diff --git a/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp b/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp
index 3be8e15..384f53e 100644
--- a/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp
+++ b/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp
@@ -1133,7 +1133,7 @@
}
void filterParameters(const CameraMetadata& src, const CameraMetadata& deviceInfo,
- int vendorTagId, CameraMetadata& dst) {
+ metadata_vendor_id_t vendorTagId, CameraMetadata& dst) {
const CameraMetadata params(src);
camera_metadata_ro_entry_t availableSessionKeys = deviceInfo.find(
ANDROID_REQUEST_AVAILABLE_SESSION_KEYS);
diff --git a/services/camera/libcameraservice/utils/SessionConfigurationUtils.h b/services/camera/libcameraservice/utils/SessionConfigurationUtils.h
index 29e3eca..5b2ea5c 100644
--- a/services/camera/libcameraservice/utils/SessionConfigurationUtils.h
+++ b/services/camera/libcameraservice/utils/SessionConfigurationUtils.h
@@ -177,7 +177,7 @@
aidl::android::hardware::camera::device::RequestTemplate* tempId /*out*/);
void filterParameters(const CameraMetadata& src, const CameraMetadata& deviceInfo,
- int vendorTagId, CameraMetadata& dst);
+ metadata_vendor_id_t vendorTagId, CameraMetadata& dst);
constexpr int32_t MAX_SURFACES_PER_STREAM = 4;