Fix asserts for GetReadbackBufferFenceInactive

If there's no readback buffer, then the status is NOT ok(), and the
returned fence must be -1.

Bug: 213493262
Test: VtsHalGraphicsComposer3_TargetTest
Change-Id: Iff1b6e04126bfcc748f0f8d173f63244bfd83be4
This commit is contained in:
Alec Mouri 2022-01-20 17:16:38 -08:00
parent 7b4d5ee452
commit 62ae37be3c

View file

@ -521,8 +521,9 @@ TEST_P(GraphicsCompositionTest, GetReadbackBufferFenceInactive) {
ndk::ScopedFileDescriptor releaseFence;
const auto error = mComposerClient->getReadbackBufferFence(mPrimaryDisplay, &releaseFence);
EXPECT_TRUE(error.isOk());
ASSERT_FALSE(error.isOk());
EXPECT_EQ(IComposerClient::EX_UNSUPPORTED, error.getServiceSpecificError());
EXPECT_EQ(-1, releaseFence.get());
}
TEST_P(GraphicsCompositionTest, ClientComposition) {