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

Commit f819a558 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-qpr1-dev am: 66a59c3e

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

Change-Id: I49aab7ffd82303c17a0cbb1bd2c8a74c33612394
parents 78540c2c 66a59c3e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -386,6 +386,13 @@ void Scheduler::dispatchCachedReportedMode() {
    }

    const auto modeId = *mFeatures.modeId;
    // If the modeId 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 (mRefreshRateConfigs.getCurrentRefreshRate().getModeId() != modeId) {
        return;
    }

    const auto vsyncPeriod = mRefreshRateConfigs.getRefreshRateFromModeId(modeId).getVsyncPeriod();

    // If there is no change from cached mode, there is no need to dispatch an event