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

Commit 10146769 authored by Evan Rosky's avatar Evan Rosky Committed by Automerger Merge Worker
Browse files

Merge "Create surfacecontrol before layout in relayoutWindow" into sc-dev am: 272c776d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13678732

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4bc06bfdc2183f8106a0108bdf82a06238100a9e
parents b3b3c40f 272c776d
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -2393,15 +2393,9 @@ public class WindowManagerService extends IWindowManager.Stub
                }
            }

            // We may be deferring layout passes at the moment, but since the client is interested
            // in the new out values right now we need to force a layout.
            mWindowPlacerLocked.performSurfacePlacement(true /* force */);

            // Create surfaceControl before surface placement otherwise layout will be skipped
            // (because WS.isGoneForLayout() is true when there is no surface.
            if (shouldRelayout) {
                Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "relayoutWindow: viewVisibility_1");

                result = win.relayoutVisibleWindow(result);

                try {
                    result = createSurfaceControl(outSurfaceControl, result, win, winAnimator);
                } catch (Exception e) {
@@ -2413,6 +2407,17 @@ public class WindowManagerService extends IWindowManager.Stub
                    Binder.restoreCallingIdentity(origId);
                    return 0;
                }
            }

            // We may be deferring layout passes at the moment, but since the client is interested
            // in the new out values right now we need to force a layout.
            mWindowPlacerLocked.performSurfacePlacement(true /* force */);

            if (shouldRelayout) {
                Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "relayoutWindow: viewVisibility_1");

                result = win.relayoutVisibleWindow(result);

                if ((result & WindowManagerGlobal.RELAYOUT_RES_FIRST_TIME) != 0) {
                    focusMayChange = true;
                }