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

Commit 27bcb550 authored by Ady Abraham's avatar Ady Abraham
Browse files

SF: reset the idle timer if a frame is scheduled

There is a case where the idle timer might expire while SF is active
as it is not getting reset if SF was already scheduled from some other
reason.

Change-Id: If79b2df4f0fe56b70658a5495069a556d3fdfc79
Test: atest android.platform.test.scenario.sysui.bubble.ShowBubbleAndShowImeMicrobenchmark#testShowBubbleAndShowIme
Bug: 264952266
parent 492cf57a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3843,6 +3843,10 @@ void SurfaceFlinger::setTransactionFlags(uint32_t mask, TransactionSchedule sche

    if (const bool scheduled = mTransactionFlags.fetch_or(mask) & mask; !scheduled) {
        scheduleCommit(frameHint);
    } else if (frameHint == FrameHint::kActive) {
        // Even if the next frame is already scheduled, we should reset the idle timer
        // as a new activity just happened.
        mScheduler->resetIdleTimer();
    }
}