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

Commit 85d22a69 authored by Chen Bai's avatar Chen Bai Committed by Android (Google) Code Review
Browse files

Merge "draw-wakelock: acquire only for state DOZE not DOZE_SUSPEND" into main

parents 9134b213 350cf6e8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2476,8 +2476,10 @@ public final class ViewRootImpl implements ViewParent,
            return;
        }
        if (!Display.isDozeState(mAttachInfo.mDisplayState)) {
            // Only need to acquire wake lock for DOZE state.
        if (mAttachInfo.mDisplayState != Display.STATE_DOZE) {
            // In DOZE_SUSPEND, Android shouldn't control the display; therefore we only poke the
            // draw wake lock when display state is DOZE. Noted that Display#isDozeState includes
            // DOZE_SUSPEND as well, so, it's not feasible here.
            return;
        }
        if (mWindowAttributes.type != WindowManager.LayoutParams.TYPE_BASE_APPLICATION) {