From 2b4caee38aea56466e2498329206cd25b6941fda Mon Sep 17 00:00:00 2001 From: Valerie Hau Date: Fri, 8 May 2020 10:17:49 -0700 Subject: [PATCH] Fix Mapper Protected test Bug: 155942443 Test: build, boot Change-Id: Ie258184981615d714878b108f2e00452fbf95358 --- .../4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp index 8247ded1fe..5ab647f7b3 100644 --- a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp +++ b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp @@ -965,7 +965,7 @@ TEST_P(GraphicsMapperHidlTest, GetProtectedContent) { const native_handle_t* bufferHandle = nullptr; bufferHandle = mGralloc->allocate(info, true, true); - if (bufferHandle) { + if (!bufferHandle) { GTEST_SUCCEED() << "unable to allocate protected content"; return; } @@ -1268,7 +1268,7 @@ TEST_P(GraphicsMapperHidlTest, SetProtectedContent) { info.usage = BufferUsage::PROTECTED | BufferUsage::COMPOSER_OVERLAY; bufferHandle = mGralloc->allocate(info, true, true); - if (bufferHandle) { + if (!bufferHandle) { GTEST_SUCCEED() << "unable to allocate protected content"; return; }