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

Commit 287827d2 authored by Steven Thomas's avatar Steven Thomas Committed by Android (Google) Code Review
Browse files

Merge "Return correct config from getActiveConfig()"

parents 6b09de4e c909845d
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -876,8 +876,17 @@ int SurfaceFlinger::getActiveConfig(const sp<IBinder>& displayToken) {
        return BAD_VALUE;
    }

    if (display->isPrimary()) {
        std::lock_guard<std::mutex> lock(mActiveConfigLock);
        if (mDesiredActiveConfigChanged) {
            return mDesiredActiveConfig.configId;
        } else {
            return display->getActiveConfig();
        }
    } else {
        return display->getActiveConfig();
    }
}

void SurfaceFlinger::setDesiredActiveConfig(const ActiveConfigInfo& info) {
    ATRACE_CALL();