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. Change-Id: Ibf08074eff555c14a318236bd06e7b4855503140
This commit is contained in:
committed by
Naseer Ahmed
parent
bf17375e5e
commit
0d38dc16a6
@@ -639,6 +639,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;
|
||||
@@ -851,8 +852,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);
|
||||
}
|
||||
|
||||
@@ -7599,7 +7600,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();
|
||||
|
||||
Reference in New Issue
Block a user