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

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

Merge "SurfaceFlinger: lock mStateLock when modifying allowed configs"

parents 223ebb0e a3129fbf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5452,7 +5452,7 @@ status_t SurfaceFlinger::setAllowedDisplayConfigs(const sp<IBinder>& displayToke
        return NO_ERROR;
    }

    postMessageSync(new LambdaMessage([&]() NO_THREAD_SAFETY_ANALYSIS {
    postMessageSync(new LambdaMessage([&]() {
        const auto display = getDisplayDeviceLocked(displayToken);
        if (!display) {
            ALOGE("Attempt to set allowed display configs for invalid display token %p",
@@ -5460,6 +5460,7 @@ status_t SurfaceFlinger::setAllowedDisplayConfigs(const sp<IBinder>& displayToke
        } else if (display->isVirtual()) {
            ALOGW("Attempt to set allowed display configs for virtual display");
        } else {
            Mutex::Autolock lock(mStateLock);
            setAllowedDisplayConfigsInternal(display, allowedConfigs);
        }
    }));