Add isSupportedNoFailure and call in IsSupportedR8
The upper layers will treat this failure as a lack of support, so make
the test do the same. This allows the test to pass on flame.
Bug: 219606432
Test: atest VtsHalGraphicsMapperV4_0TargetTest
Change-Id: I57eab60de81989cae59baa8c25b53a1c94229187
diff --git a/graphics/mapper/4.0/utils/vts/MapperVts.cpp b/graphics/mapper/4.0/utils/vts/MapperVts.cpp
index 5b2a94e..901f0e3 100644
--- a/graphics/mapper/4.0/utils/vts/MapperVts.cpp
+++ b/graphics/mapper/4.0/utils/vts/MapperVts.cpp
@@ -303,6 +303,14 @@
return supported;
}
+bool Gralloc::isSupportedNoFailure(const IMapper::BufferDescriptorInfo& descriptorInfo) {
+ bool supported = false;
+ mMapper->isSupported(descriptorInfo, [&](const auto& tmpError, const auto& tmpSupported) {
+ supported = tmpSupported && tmpError == Error::NONE;
+ });
+ return supported;
+}
+
Error Gralloc::get(const native_handle_t* bufferHandle, const IMapper::MetadataType& metadataType,
hidl_vec<uint8_t>* outVec) {
Error err;