Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91590879 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

getDisplayDecorationSupport test: allow errors

Allow getDisplayDecorationSupport to return an error, and treat that as
unsupported. This allows Cuttlefish, which, with
I91105fc3345dbd75aeb0b102f3f0138fa33120c0, returns Unsupported, to pass
the test.

Bug: 209458568
Test: this
Change-Id: I8e17d3c0ca0ac4eacb0b5e4c8ae540f271e68a23
parent 5cb7fe91
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1627,10 +1627,8 @@ TEST_P(GraphicsComposerAidlCommandTest, DisplayDecoration) {

        const auto [error, support] =
                mComposerClient->getDisplayDecorationSupport(display.getDisplayId());
        EXPECT_TRUE(error.isOk());

        const auto format =
                support ? support->format
        const auto format = (error.isOk() && support) ? support->format
                        : aidl::android::hardware::graphics::common::PixelFormat::RGBA_8888;
        const auto decorBuffer = allocate(static_cast<::android::PixelFormat>(format));
        ASSERT_NE(nullptr, decorBuffer);