Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6be61a98 authored by Vinu Deokaran's avatar Vinu Deokaran Committed by Wale Ogunwale
Browse files

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
parent ac3b53a7
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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();