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

Commit 7e4083d8 authored by Nick Chameyev's avatar Nick Chameyev Committed by Android (Google) Code Review
Browse files

Merge "Add logs for folding sleep behavior" into main

parents 7de137da 3a7e04a7
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -506,9 +506,6 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
            return;
        }

        Slog.i(TAG, "Requesting Transition to state: " + state.getIdentifier() + ", from state="
                + mDeviceState.getIdentifier() + ", interactive=" + mInteractive
                + ", mBootCompleted=" + mBootCompleted);
        // As part of a state transition, we may need to turn off some displays temporarily so that
        // the transition is smooth. Plus, on some devices, only one internal displays can be
        // on at a time. We use LogicalDisplay.setIsInTransition to mark a display that needs to be
@@ -522,6 +519,11 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener {
        final boolean sleepDevice = shouldDeviceBePutToSleep(mPendingDeviceState, mDeviceState,
                mInteractive, mBootCompleted);

        Slog.i(TAG, "Requesting Transition to state: " + state.getIdentifier() + ", from state="
                + mDeviceState.getIdentifier() + ", interactive=" + mInteractive
                + ", mBootCompleted=" + mBootCompleted + ", wakeDevice=" + wakeDevice
                + ", sleepDevice=" + sleepDevice);

        // If all displays are off already, we can just transition here, unless we are trying to
        // wake or sleep the device as part of this transition. In that case defer the final
        // transition until later once the device is awake/asleep.
+4 −0
Original line number Diff line number Diff line
@@ -7093,7 +7093,11 @@ public final class PowerManagerService extends SystemService
                    if ((flags & PowerManager.GO_TO_SLEEP_FLAG_SOFT_SLEEP) != 0) {
                        if (mFoldGracePeriodProvider.isEnabled()) {
                            if (!powerGroup.hasWakeLockKeepingScreenOnLocked()) {
                                Slog.d(TAG, "Showing dismissible keyguard");
                                mNotifier.showDismissibleKeyguard();
                            } else {
                                Slog.i(TAG, "There is a screen wake lock present: "
                                        + "sleep request will be ignored");
                            }
                            continue; // never actually goes to sleep for SOFT_SLEEP
                        } else {