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

Commit 5d8dc5cc authored by Ady Abraham's avatar Ady Abraham Committed by Automerger Merge Worker
Browse files

Merge "SF: return the active display from getInternalDisplayId" into sc-v2-dev am: 403a0be8

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15305460

Change-Id: Ia7ce63c8a75f23b9ad8da2ba0b4ce86151640e55
parents 0fbf2976 403a0be8
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -619,17 +619,17 @@ void SurfaceFlinger::releaseVirtualDisplay(VirtualDisplayId displayId) {
}

std::vector<PhysicalDisplayId> SurfaceFlinger::getPhysicalDisplayIdsLocked() const {
    const auto internalDisplayId = getInternalDisplayIdLocked();
    if (!internalDisplayId) {
    const auto display = getDefaultDisplayDeviceLocked();
    if (!display) {
        return {};
    }

    std::vector<PhysicalDisplayId> displayIds;
    displayIds.reserve(mPhysicalDisplayTokens.size());
    displayIds.push_back(*internalDisplayId);
    displayIds.push_back(display->getPhysicalId());

    for (const auto& [id, token] : mPhysicalDisplayTokens) {
        if (id != *internalDisplayId) {
        if (id != display->getPhysicalId()) {
            displayIds.push_back(id);
        }
    }