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

Commit 0c268c7a authored by Marin Shalamanov's avatar Marin Shalamanov
Browse files

SF: Don't override active mode with desired mode

getDynamicDisplayInfo().activeDisplayModeId should
not return the upcoming mode if we are in the process
of a mode change.

Bug: 180090041
Test: presubmit
Test: atest DisplayTest
Change-Id: I8b2b80f5ce1f57e4652d8794fd40a1f78715af6f
parent 06c667b0
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -914,11 +914,6 @@ status_t SurfaceFlinger::getDynamicDisplayInfo(const sp<IBinder>& displayToken,
    }

    info->activeDisplayModeId = static_cast<int32_t>(display->getActiveMode()->getId().value());
    if (display->isPrimary()) {
        if (const auto mode = getDesiredActiveMode()) {
            info->activeDisplayModeId = static_cast<int32_t>(mode->modeId.value());
        }
    }

    const auto& supportedModes = display->getSupportedModes();
    info->supportedDisplayModes.clear();