Merge "Relax constraints on getting PlaneLayouts" into rvc-dev
diff --git a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
index 5c8d0d8..0689919 100644
--- a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
+++ b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
@@ -1865,13 +1865,15 @@
*/
TEST_P(GraphicsMapperHidlTest, GetFromBufferDescriptorInfoPlaneLayouts) {
hidl_vec<uint8_t> vec;
- ASSERT_EQ(Error::NONE,
- mGralloc->getFromBufferDescriptorInfo(mDummyDescriptorInfo,
- gralloc4::MetadataType_PlaneLayouts, &vec));
-
- std::vector<PlaneLayout> planeLayouts;
- ASSERT_EQ(NO_ERROR, gralloc4::decodePlaneLayouts(vec, &planeLayouts));
- ASSERT_NO_FATAL_FAILURE(verifyDummyDescriptorInfoPlaneLayouts(planeLayouts));
+ const auto ret = mGralloc->getFromBufferDescriptorInfo(
+ mDummyDescriptorInfo, gralloc4::MetadataType_PlaneLayouts, &vec);
+ if (ret == Error::NONE) {
+ std::vector<PlaneLayout> planeLayouts;
+ ASSERT_EQ(NO_ERROR, gralloc4::decodePlaneLayouts(vec, &planeLayouts));
+ ASSERT_NO_FATAL_FAILURE(verifyDummyDescriptorInfoPlaneLayouts(planeLayouts));
+ } else {
+ ASSERT_EQ(Error::UNSUPPORTED, ret);
+ }
}
/**