From 6be61a98fccbadfdcfcefe9aa51d90bfb6c13901 Mon Sep 17 00:00:00 2001 From: Vinu Deokaran Date: Tue, 16 Dec 2014 10:52:52 -0500 Subject: wm: call displayReady for all built in displays when system is ready. When system has more than one built in display, displayReady needs to be called for all built in displays when window manager is ready. Otherwise, some system services, such as presentation, mediarouter, etc, won't work on these displays. Bug: 24103683 Change-Id: Ibf08074eff555c14a318236bd06e7b4855503140 --- .../core/java/com/android/server/wm/WindowManagerService.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'services') diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index e903e4f..71bbdb6 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -642,6 +642,7 @@ public class WindowManagerService extends IWindowManager.Stub final InputManagerService mInputManager; final DisplayManagerInternal mDisplayManagerInternal; final DisplayManager mDisplayManager; + final Display[] mDisplays; // Who is holding the screen on. Session mHoldingScreenOn; @@ -915,8 +916,8 @@ public class WindowManagerService extends IWindowManager.Stub mFxSession = new SurfaceSession(); mDisplayManager = (DisplayManager)context.getSystemService(Context.DISPLAY_SERVICE); - Display[] displays = mDisplayManager.getDisplays(); - for (Display display : displays) { + mDisplays = mDisplayManager.getDisplays(); + for (Display display : mDisplays) { createDisplayContentLocked(display); } @@ -7641,7 +7642,9 @@ public class WindowManagerService extends IWindowManager.Stub } public void displayReady() { - displayReady(Display.DEFAULT_DISPLAY); + for (Display display : mDisplays) { + displayReady(display.getDisplayId()); + } synchronized(mWindowMap) { final DisplayContent displayContent = getDefaultDisplayContentLocked(); -- cgit v1.1