diff options
| author | 2019-09-05 03:00:36 +0000 | |
|---|---|---|
| committer | 2019-09-05 03:00:36 +0000 | |
| commit | 126a25ea59e622bb614cb12b8200bed50f731f95 (patch) | |
| tree | c2b7a88af9f4f965fd4466922782630552ae56b1 | |
| parent | 73ea61472890d6bcd72cdef7097501812c3da189 (diff) | |
| parent | d6536aa908a82d909b99d81012fd3b258faf0d84 (diff) | |
Snap for 5853686 from d6536aa908a82d909b99d81012fd3b258faf0d84 to qt-qpr1-release
Change-Id: I1f1ba56e5b93023b2d1924b02767f8936892b3de
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index b31bc3813a..ab22cd9016 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -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(); |