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

Commit bc1e33ff authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SF: Fix getAllowedDisplayConfigs in multi-display mode" into qt-dev

parents 989d4217 4f1dd8ca
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -5876,12 +5876,15 @@ status_t SurfaceFlinger::getAllowedDisplayConfigs(const sp<IBinder>& displayToke

    Mutex::Autolock lock(mStateLock);

    if (displayToken != getInternalDisplayTokenLocked()) {
        ALOGE("%s is only supported for the internal display", __FUNCTION__);
    const auto display = getDisplayDeviceLocked(displayToken);
    if (!display) {
        return NAME_NOT_FOUND;
    }

    if (display->isPrimary()) {
        outAllowedConfigs->assign(mAllowedDisplayConfigs.begin(), mAllowedDisplayConfigs.end());
    }

    return NO_ERROR;
}