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

Commit 6d3e9b17 authored by Rupesh Bansal's avatar Rupesh Bansal
Browse files

Remove flag offload doze override holds wakelock

Bug: 406201652
Flag: EXEMPT flag removal
Test: EXEMPT builds successfully
Change-Id: Id8e8d1c945c71420aa449b79eb2ce5732a1205c2
parent 97faf816
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -825,10 +825,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
        if (mDisplayOffloadSession != null
                && (DisplayOffloadSession.isSupportedOffloadState(displayState)
                || displayState == Display.STATE_UNKNOWN)) {
            if (mFlags.isOffloadDozeOverrideHoldsWakelockEnabled()) {
            mWakelockController.acquireWakelock(
                    WakelockController.WAKE_LOCK_OVERRIDE_DOZE_SCREEN_STATE);
            }
            synchronized (mLock) {
                mPendingOverrideDozeScreenStateLocked = displayState;
            }
@@ -838,10 +836,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
                            .overrideDozeScreenState(mPendingOverrideDozeScreenStateLocked, reason);
                }
                updatePowerState();
                if (mFlags.isOffloadDozeOverrideHoldsWakelockEnabled()) {
                mWakelockController.releaseWakelock(
                        WakelockController.WAKE_LOCK_OVERRIDE_DOZE_SCREEN_STATE);
                }
            }, mClock.uptimeMillis());
        }
    }
+0 −10
Original line number Diff line number Diff line
@@ -171,11 +171,6 @@ public class DisplayManagerFlags {
            Flags::enableSynthetic60hzModes
    );

    private final FlagState mOffloadDozeOverrideHoldsWakelock = new FlagState(
            Flags.FLAG_OFFLOAD_DOZE_OVERRIDE_HOLDS_WAKELOCK,
            Flags::offloadDozeOverrideHoldsWakelock
    );

    private final FlagState mOffloadSessionCancelBlockScreenOn = new FlagState(
            Flags.FLAG_OFFLOAD_SESSION_CANCEL_BLOCK_SCREEN_ON,
            Flags::offloadSessionCancelBlockScreenOn);
@@ -449,10 +444,6 @@ public class DisplayManagerFlags {
        return mPeakRefreshRatePhysicalLimit.isEnabled();
    }

    public boolean isOffloadDozeOverrideHoldsWakelockEnabled() {
        return mOffloadDozeOverrideHoldsWakelock.isEnabled();
    }

    public boolean isOffloadSessionCancelBlockScreenOnEnabled() {
        return mOffloadSessionCancelBlockScreenOn.isEnabled();
    }
@@ -662,7 +653,6 @@ public class DisplayManagerFlags {
        pw.println(" " + mPeakRefreshRatePhysicalLimit);
        pw.println(" " + mIgnoreAppPreferredRefreshRate);
        pw.println(" " + mSynthetic60hzModes);
        pw.println(" " + mOffloadDozeOverrideHoldsWakelock);
        pw.println(" " + mOffloadSessionCancelBlockScreenOn);
        pw.println(" " + mNewHdrBrightnessModifier);
        pw.println(" " + mVirtualDisplayLimit);
+0 −11
Original line number Diff line number Diff line
@@ -287,17 +287,6 @@ flag {
    }
}

flag {
    name: "offload_doze_override_holds_wakelock"
    namespace: "display_manager"
    description: "DisplayPowerController holds a suspend-blocker while changing the display state on behalf of offload doze override."
    bug: "338403827"
    is_fixed_read_only: true
    metadata {
      purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "offload_session_cancel_block_screen_on"
    namespace: "wear_frameworks"
+0 −2
Original line number Diff line number Diff line
@@ -1587,8 +1587,6 @@ public final class DisplayPowerControllerTest {

    @Test
    public void testDozeScreenStateOverride_toSupportedOffloadStateFromDoze_DisplayStateChanges() {
        when(mDisplayManagerFlagsMock.isOffloadDozeOverrideHoldsWakelockEnabled()).thenReturn(true);

        // set up.
        int initState = Display.STATE_DOZE;
        int supportedTargetState = Display.STATE_DOZE_SUSPEND;