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

Commit cf6e0d68 authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Add display synchronously." into klp-modular-dev

parents bb0a4f20 ad25fa36
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2986,8 +2986,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
            final Display display = virtualDisplay.getDisplay();
            final int displayId = display.getDisplayId();

            // Do WindowManager operation first so that it is ahead of CREATE_STACK in the H queue.
            mWindowManager.onDisplayAdded(displayId);
            mWindowManager.handleDisplayAdded(displayId);

            synchronized (mService) {
                ActivityDisplay activityDisplay = new ActivityDisplay(display);
+8 −9
Original line number Diff line number Diff line
@@ -4865,7 +4865,6 @@ public class WindowManagerService extends IWindowManager.Stub
            final TaskStack stack = task.mStack;
            EventLog.writeEvent(EventLogTags.WM_TASK_REMOVED, taskId, "removeTask");
            stack.removeTask(task);
            stack.getDisplayContent().layoutNeeded = true;
        }
    }

@@ -7447,9 +7446,7 @@ public class WindowManagerService extends IWindowManager.Stub
                }

                case DO_DISPLAY_ADDED:
                    synchronized (mWindowMap) {
                        handleDisplayAddedLocked(msg.arg1);
                    }
                    handleDisplayAdded(msg.arg1);
                    break;

                case DO_DISPLAY_REMOVED:
@@ -10786,13 +10783,15 @@ public class WindowManagerService extends IWindowManager.Stub
        mH.sendMessage(mH.obtainMessage(H.DO_DISPLAY_ADDED, displayId, 0));
    }

    private void handleDisplayAddedLocked(int displayId) {
    public void handleDisplayAdded(int displayId) {
        synchronized (mWindowMap) {
            final Display display = mDisplayManager.getDisplay(displayId);
            if (display != null) {
                createDisplayContentLocked(display);
                displayReady(displayId);
            }
        }
    }

    @Override
    public void onDisplayRemoved(int displayId) {