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

Commit fc11ec49 authored by dhacker29's avatar dhacker29 Committed by Steve Kondik
Browse files

PowerManagerService: Honor config_dreamsActivatedOnSleepByDefault

The current behavior causes isItBedTimeYetLocked to be called when
waking the device from a dream, which causes the display to blank.
On TV devices this is not the expected behavior.  Use the already
defined overlay config_dreamsActivatedOnSleepByDefault to skip the
call to isItBedTimeYetLocked and allow the screen to become active
again instead.  This will have not affect devices without the overlay.

Change-Id: I30c5c8c9c09e3d57ace18cac72b783510b9b3bf3
parent a67f6989
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1934,7 +1934,7 @@ public final class PowerManagerService extends SystemService
                }

                // Dream has ended or will be stopped.  Update the power state.
                if (isItBedTimeYetLocked()) {
                if (isItBedTimeYetLocked() && !mDreamsActivatedOnSleepByDefaultConfig) {
                    goToSleepNoUpdateLocked(SystemClock.uptimeMillis(),
                            PowerManager.GO_TO_SLEEP_REASON_TIMEOUT, 0, Process.SYSTEM_UID);
                    updatePowerStateLocked();