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

Commit 0d38dc16 authored by Vinu Deokaran's avatar Vinu Deokaran Committed by Naseer Ahmed
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.

Change-Id: Ibf08074eff555c14a318236bd06e7b4855503140
parent bf17375e
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -639,6 +639,7 @@ public class WindowManagerService extends IWindowManager.Stub
    final InputManagerService mInputManager;
    final InputManagerService mInputManager;
    final DisplayManagerInternal mDisplayManagerInternal;
    final DisplayManagerInternal mDisplayManagerInternal;
    final DisplayManager mDisplayManager;
    final DisplayManager mDisplayManager;
    final Display[] mDisplays;


    // Who is holding the screen on.
    // Who is holding the screen on.
    Session mHoldingScreenOn;
    Session mHoldingScreenOn;
@@ -851,8 +852,8 @@ public class WindowManagerService extends IWindowManager.Stub


        mFxSession = new SurfaceSession();
        mFxSession = new SurfaceSession();
        mDisplayManager = (DisplayManager)context.getSystemService(Context.DISPLAY_SERVICE);
        mDisplayManager = (DisplayManager)context.getSystemService(Context.DISPLAY_SERVICE);
        Display[] displays = mDisplayManager.getDisplays();
        mDisplays = mDisplayManager.getDisplays();
        for (Display display : displays) {
        for (Display display : mDisplays) {
            createDisplayContentLocked(display);
            createDisplayContentLocked(display);
        }
        }


@@ -7599,7 +7600,9 @@ public class WindowManagerService extends IWindowManager.Stub
    }
    }


    public void displayReady() {
    public void displayReady() {
        displayReady(Display.DEFAULT_DISPLAY);
        for (Display display : mDisplays) {
            displayReady(display.getDisplayId());
        }


        synchronized(mWindowMap) {
        synchronized(mWindowMap) {
            final DisplayContent displayContent = getDefaultDisplayContentLocked();
            final DisplayContent displayContent = getDefaultDisplayContentLocked();