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

Commit 5798347a authored by Ady Abraham's avatar Ady Abraham Committed by Automerger Merge Worker
Browse files

Merge "SF: fix a bug with DISPLAY_EVENT_MODE_CHANGE" into sc-v2-dev am: df63752e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15427110

Change-Id: I217b248ab1592692b3f3c88d1195e252fcb8f95e
parents fe62b2c2 df63752e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -395,6 +395,14 @@ void Scheduler::dispatchCachedReportedMode() {
        return;
    }

    // If the mode is not the current mode, this means that a
    // mode change is in progress. In that case we shouldn't dispatch an event
    // as it will be dispatched when the current mode changes.
    if (std::scoped_lock lock(mRefreshRateConfigsLock);
        mRefreshRateConfigs->getCurrentRefreshRate().getMode() != mFeatures.mode) {
        return;
    }

    // If there is no change from cached mode, there is no need to dispatch an event
    if (mFeatures.mode == mFeatures.cachedModeChangedParams->mode) {
        return;