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

Commit 0b36f8d8 authored by mtk07406's avatar mtk07406 Committed by Michael Bestas
Browse files

Fix VTS fail for GraphicsMapperHidlTest

VTS_10 testing item VtsHalGraphicsMapperV2_1Target fail due to
Gralloc0 HAL do not have return value : BAD_VALUE and BAD_BUFFER
so add Error::BAD_VALUE and Error::BAD_BUFFER as return value to
fix this VTS fail.

Bug: 146034198
Test: ran VtsHalGraphicsMapperV2_1Target 10 times and it all pass.
Change-Id: I792830ddf98cbf59de7d3a7b4dd4cf5f72269244
(cherry picked from commit e308ceb1)
parent 2d28ba8c
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -49,7 +49,12 @@ class Gralloc0HalImpl : public V2_0::passthrough::detail::Gralloc0HalImpl<Hal> {
                 mModule, bufferHandle, descriptorInfo.width, descriptorInfo.height,
                 mModule, bufferHandle, descriptorInfo.width, descriptorInfo.height,
                 static_cast<int32_t>(descriptorInfo.format),
                 static_cast<int32_t>(descriptorInfo.format),
                 static_cast<uint64_t>(descriptorInfo.usage), stride);
                 static_cast<uint64_t>(descriptorInfo.usage), stride);
         return static_cast<Error>(ret);
         if (ret == -EINVAL) {
             return Error::BAD_BUFFER;
         } else if (ret < 0) {
             return Error::BAD_VALUE;
         }
         return Error::NONE;
     }
     }
     Error getTransportSize(const native_handle_t* bufferHandle, uint32_t* outNumFds,
     Error getTransportSize(const native_handle_t* bufferHandle, uint32_t* outNumFds,
                            uint32_t* outNumInts) override {
                            uint32_t* outNumInts) override {