Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5df919e authored by Alec Mouri's avatar Alec Mouri Committed by Android (Google) Code Review
Browse files

Merge "Add API level for IMapper 4's bad metadata test" into main

parents 2421fc70 2ee33176
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -2223,12 +2223,15 @@ 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.
    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));
    }
}

/**
 * Test IMapper::getFromBufferDescriptorInfo(BufferId)