[VTS] Update SetDisplayBrightness test item

Ensure the primary display power on before run the
SetDisplayBrightness test item.

Bug: 313794734
Test: atest VtsHalGraphicsComposer3_TargetTest:PerInstance/
      GraphicsComposerAidlCommandTest#SetDisplayBrightness/
      0_android_hardware_graphics_composer3_IComposer_default
      -- --abi arm64-v8a
Change-Id: I94fb700704bcbd8543f2a608dd75b9e745e40e37
Merged-In: I94fb700704bcbd8543f2a608dd75b9e745e40e37
This commit is contained in:
Peter Lin 2023-12-14 05:43:25 +00:00
parent dc0acfbbfe
commit 70d2ef6b34

View file

@ -1554,6 +1554,7 @@ TEST_P(GraphicsComposerAidlCommandTest, SetLayerColorTransform) {
}
TEST_P(GraphicsComposerAidlCommandTest, SetDisplayBrightness) {
EXPECT_TRUE(mComposerClient->setPowerMode(getPrimaryDisplayId(), PowerMode::ON).isOk());
const auto& [status, capabilities] =
mComposerClient->getDisplayCapabilities(getPrimaryDisplayId());
ASSERT_TRUE(status.isOk());