From 36966ca4ab1966fd33053ff451af52b8ffbca02e Mon Sep 17 00:00:00 2001 From: Adrian Salido Date: Thu, 22 Aug 2019 20:41:15 +0000 Subject: [PATCH] Revert "Hold Display suspend blocker until doze starts" This reverts commit 93e164726f2d243eb75351b4e52d683573f9f802. Reason for revert: This is causing wake lock to remain held while screen is off Bug: 139875245 Change-Id: I0ff714a0cf2496d141d355de68761ab720a09539 --- .../com/android/server/power/PowerManagerService.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java index dc56b03bb100e..aa49ba62f48b1 100644 --- a/services/core/java/com/android/server/power/PowerManagerService.java +++ b/services/core/java/com/android/server/power/PowerManagerService.java @@ -2735,17 +2735,6 @@ public final class PowerManagerService extends SystemService if (mScreenBrightnessBoostInProgress) { return true; } - - // Because summoning the sandman is asyncronous, there is a time-gap where - // we release the display suspend blocker before the dream service acquires - // their own wakelock. Within this gap, we can end up suspending before - // dream service has a chance to start. To avoid this, we check if we want - // to doze and the sandman is scheduled and if so, keep the display on until - // that has passed. - if (mWakefulness == WAKEFULNESS_DOZING && mSandmanScheduled) { - return true; - } - // Let the system suspend if the screen is off or dozing. return false; }