Check createComposer().isOk() in test setup

Bug: b/193240715
Test: cvd start
Test: vts -m VtsHalGraphicsComposer3_TargetTest
Change-Id: I0a2b90bcb403fbf3454046d3e46bf972a4d149f7
This commit is contained in:
Jason Macnak 2022-01-20 08:49:09 -08:00
parent 90736694d2
commit e531a092fc

View file

@ -76,7 +76,10 @@ class GraphicsComposerAidlTest : public ::testing::TestWithParam<std::string> {
ASSERT_NE(binder, nullptr);
ASSERT_NO_FATAL_FAILURE(mComposer = IComposer::fromBinder(binder));
ASSERT_NE(mComposer, nullptr);
ASSERT_NO_FATAL_FAILURE(mComposer->createClient(&mComposerClient));
ndk::ScopedAStatus status;
ASSERT_NO_FATAL_FAILURE(status = mComposer->createClient(&mComposerClient));
ASSERT_TRUE(status.isOk());
mComposerCallback = ::ndk::SharedRefBase::make<GraphicsComposerCallback>();
EXPECT_TRUE(mComposerClient->registerCallback(mComposerCallback).isOk());