From 0033a86c25fde70911086c3d8ff2738aa88c0ff6 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Wed, 8 Oct 2014 12:06:39 -0700 Subject: Ensure we correctly unblank displays when added. A previous change introduced a regression in the case where a device has been added but is initially blanked. Because we made changes to defer certain work until we escape the critical section when making changes to the global display state, we forgot to apply these changes when displays are initially added. This causes problems with HDMI displays remaining blanked after they are plugged in. Added a quick fix to ensure we perform the work when adding a display although we don't bother trying to defer it outside of the critical section. Bug: 17909838 Change-Id: If5373d20d8827b7f4330a8cf49f8de64ca3f0740 --- .../core/java/com/android/server/display/DisplayManagerService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java index 97748e865e5c..09dc47797d45 100644 --- a/services/core/java/com/android/server/display/DisplayManagerService.java +++ b/services/core/java/com/android/server/display/DisplayManagerService.java @@ -651,7 +651,10 @@ public final class DisplayManagerService extends SystemService { mDisplayDevices.add(device); addLogicalDisplayLocked(device); - updateDisplayStateLocked(device); + Runnable work = updateDisplayStateLocked(device); + if (work != null) { + work.run(); + } scheduleTraversalLocked(false); } -- cgit v1.2.3-59-g8ed1b