Loading services/core/java/com/android/server/wm/RootWindowContainer.java +12 −1 Original line number Diff line number Diff line Loading @@ -204,9 +204,20 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { } DisplayContent createDisplayContent(final Display display, DisplayWindowController controller) { final int displayId = display.getDisplayId(); // In select scenarios, it is possible that a DisplayContent will be created on demand // rather than waiting for the controller. In this case, associate the controller and return // the existing display. final DisplayContent existing = getDisplayContent(displayId); if (existing != null) { existing.setController(controller); return existing; } final DisplayContent dc = new DisplayContent(display, mService, mWallpaperController, controller); final int displayId = display.getDisplayId(); if (DEBUG_DISPLAY) Slog.v(TAG_WM, "Adding display=" + display); Loading services/core/java/com/android/server/wm/WindowManagerService.java +12 −1 Original line number Diff line number Diff line Loading @@ -1131,7 +1131,18 @@ public class WindowManagerService extends IWindowManager.Stub throw new IllegalStateException("Display has not been initialialized"); } final DisplayContent displayContent = mRoot.getDisplayContent(displayId); DisplayContent displayContent = mRoot.getDisplayContent(displayId); // Adding a window is an exception where the WindowManagerService can create the // display instead of waiting for the ActivityManagerService to drive creation. if (displayContent == null) { final Display display = mDisplayManager.getDisplay(displayId); if (display != null) { displayContent = mRoot.createDisplayContent(display, null /* controller */); } } if (displayContent == null) { Slog.w(TAG_WM, "Attempted to add window to a display that does not exist: " + displayId + ". Aborting."); Loading Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +12 −1 Original line number Diff line number Diff line Loading @@ -204,9 +204,20 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { } DisplayContent createDisplayContent(final Display display, DisplayWindowController controller) { final int displayId = display.getDisplayId(); // In select scenarios, it is possible that a DisplayContent will be created on demand // rather than waiting for the controller. In this case, associate the controller and return // the existing display. final DisplayContent existing = getDisplayContent(displayId); if (existing != null) { existing.setController(controller); return existing; } final DisplayContent dc = new DisplayContent(display, mService, mWallpaperController, controller); final int displayId = display.getDisplayId(); if (DEBUG_DISPLAY) Slog.v(TAG_WM, "Adding display=" + display); Loading
services/core/java/com/android/server/wm/WindowManagerService.java +12 −1 Original line number Diff line number Diff line Loading @@ -1131,7 +1131,18 @@ public class WindowManagerService extends IWindowManager.Stub throw new IllegalStateException("Display has not been initialialized"); } final DisplayContent displayContent = mRoot.getDisplayContent(displayId); DisplayContent displayContent = mRoot.getDisplayContent(displayId); // Adding a window is an exception where the WindowManagerService can create the // display instead of waiting for the ActivityManagerService to drive creation. if (displayContent == null) { final Display display = mDisplayManager.getDisplay(displayId); if (display != null) { displayContent = mRoot.createDisplayContent(display, null /* controller */); } } if (displayContent == null) { Slog.w(TAG_WM, "Attempted to add window to a display that does not exist: " + displayId + ". Aborting."); Loading