From e39ef098963df1c50912cfeb53c01868ad91a48b Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Tue, 11 Mar 2014 20:56:26 -0700 Subject: Add a temporary hack to report screen on while dozing. The window manager and view hierarchy currently disable all drawing when PowerManager.isScreenOn() returns false so no drawing occurs while dozing. This will be fixed in a future patch to take the display blanking state into account correctly. This patch is a workaround to unblock development in the meantime. Bug: 13133142 Change-Id: I2dc0b422c77285e657d73adca2606aa68264d987 --- .../core/java/com/android/server/power/PowerManagerService.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'services/core') diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java index c31de05..c3d1553 100644 --- a/services/core/java/com/android/server/power/PowerManagerService.java +++ b/services/core/java/com/android/server/power/PowerManagerService.java @@ -1802,7 +1802,12 @@ public final class PowerManagerService extends com.android.server.SystemService private boolean isScreenOnInternal() { synchronized (mLock) { - return isScreenOnLocked(); + // XXX This is a temporary hack to let certain parts of the system pretend the + // screen is still on even when dozing and we would normally want to report + // screen off. Will be removed when the window manager is modified to use + // the true blanking state of the display. + return isScreenOnLocked() + || mWakefulness == WAKEFULNESS_DOZING; } } -- cgit v1.1