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

Commit 9fc95134 authored by Ady Abraham's avatar Ady Abraham Committed by Android (Google) Code Review
Browse files

Merge "SF: HWComposer::isConnected can be called before a display is connected" into sc-dev

parents 0e2b9747 2e9c703f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -322,10 +322,13 @@ void HWComposer::destroyLayer(HalDisplayId displayId, HWC2::Layer* layer) {
}

bool HWComposer::isConnected(PhysicalDisplayId displayId) const {
    RETURN_IF_INVALID_DISPLAY(displayId, false);
    if (mDisplayData.count(displayId)) {
        return mDisplayData.at(displayId).hwcDisplay->isConnected();
    }

    return false;
}

std::vector<HWComposer::HWCDisplayMode> HWComposer::getModes(PhysicalDisplayId displayId) const {
    RETURN_IF_INVALID_DISPLAY(displayId, {});