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

Commit 126a25ea authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5853686 from d6536aa9 to qt-qpr1-release

Change-Id: I1f1ba56e5b93023b2d1924b02767f8936892b3de
parents 73ea6147 d6536aa9
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -6175,8 +6175,20 @@ void SurfaceFlinger::setAllowedDisplayConfigsInternal(const sp<DisplayDevice>& d
        return;
    }

    const auto allowedDisplayConfigs = DisplayConfigs(allowedConfigs.begin(),
                                                      allowedConfigs.end());
    if (allowedDisplayConfigs == mAllowedDisplayConfigs) {
        return;
    }

    ALOGV("Updating allowed configs");
    mAllowedDisplayConfigs = DisplayConfigs(allowedConfigs.begin(), allowedConfigs.end());
    mAllowedDisplayConfigs = std::move(allowedDisplayConfigs);

    // TODO(b/140204874): This hack triggers a notification that something has changed, so
    // that listeners that care about a change in allowed configs can get the notification.
    // Giving current ActiveConfig so that most other listeners would just drop the event
    mScheduler->onConfigChanged(mAppConnectionHandle, display->getId()->value,
                                display->getActiveConfig());

    // Set the highest allowed config by iterating backwards on available refresh rates
    const auto& refreshRates = mRefreshRateConfigs.getRefreshRates();