Fix getDisplayCapabilitiesBasic VTS test

Old test checked error code when calling getBrightnessSupport in the
getDisplayCapabilitiesBasic test.  However, it is possible that the
function is not implemented (UNSUPPORTED).  We want to return normally
and use the returned supported boolean to check this instead.

Bug: 132043561, 132056857
Test: VtsHalGraphicsComposerV2_3TargetTest
Change-Id: I94f8f39ba9129c4a8d939a5385538db3489c46b9
This commit is contained in:
Valerie Hau
2019-05-07 11:45:06 -07:00
parent 7af01ada85
commit 804857176a

View File

@@ -192,10 +192,8 @@ Error ComposerClient::getDisplayCapabilities(
bool ComposerClient::getDisplayBrightnessSupport(Display display) {
bool support = false;
mClient->getDisplayBrightnessSupport(display, [&](const auto& error, const auto& tmpSupport) {
ASSERT_EQ(Error::NONE, error) << "failed to get brightness support";
support = tmpSupport;
});
mClient->getDisplayBrightnessSupport(
display, [&](const auto& /*error*/, const auto& tmpSupport) { support = tmpSupport; });
return support;
}