mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Add API level for IMapper 4's bad metadata test
Some devices shipped with broken validation for HDR metadata. Relax the test for vendor freeze purposes. Bug: 276843519 Test: VtsHalGraphicsMapperV4_0TargetTest Change-Id: I564f4bd12145f7831faa1e5a0f2d2abe074e4769
This commit is contained in:
@@ -2223,11 +2223,14 @@ TEST_P(GraphicsMapperHidlTest, SetBadMetadata) {
|
||||
// Keep optional metadata types below and populate the encoded metadata vec
|
||||
// with some arbitrary different metadata because the common gralloc4::decode*()
|
||||
// functions do not distinguish between an empty vec and bad value.
|
||||
ASSERT_EQ(NO_ERROR, gralloc4::encodeDataspace(Dataspace::SRGB_LINEAR, &vec));
|
||||
ASSERT_EQ(Error::UNSUPPORTED,
|
||||
mGralloc->set(bufferHandle, gralloc4::MetadataType_Smpte2086, vec));
|
||||
ASSERT_EQ(Error::UNSUPPORTED,
|
||||
mGralloc->set(bufferHandle, gralloc4::MetadataType_Cta861_3, vec));
|
||||
if (base::GetIntProperty("ro.vendor.api_level", __ANDROID_API_FUTURE__) >= __ANDROID_API_T__) {
|
||||
// Some old grallocs shipped with broken validation.
|
||||
ASSERT_EQ(NO_ERROR, gralloc4::encodeDataspace(Dataspace::SRGB_LINEAR, &vec));
|
||||
ASSERT_EQ(Error::UNSUPPORTED,
|
||||
mGralloc->set(bufferHandle, gralloc4::MetadataType_Smpte2086, vec));
|
||||
ASSERT_EQ(Error::UNSUPPORTED,
|
||||
mGralloc->set(bufferHandle, gralloc4::MetadataType_Cta861_3, vec));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user