Revert "Create surfacecontrol before layout in relayoutWindow"
The change could break legacySplitScreen functionality.
Upload a revert CL to verify flicker tests.
This reverts commit d7bdb80ef4.
Fixes: 177193568
Test: manual enter legacySplitScreen mode and dismiss
Test: atest com.android.wm.shell.flicker.legacysplitscreen
Change-Id: Ib25268f4a4a2045e44e13ea410997130bada0e6e
This commit is contained in:
@@ -2332,9 +2332,15 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
}
|
||||
|
||||
// Create surfaceControl before surface placement otherwise layout will be skipped
|
||||
// (because WS.isGoneForLayout() is true when there is no surface.
|
||||
// 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, attrChanges);
|
||||
|
||||
try {
|
||||
result = createSurfaceControl(outSurfaceControl, result, win, winAnimator);
|
||||
} catch (Exception e) {
|
||||
@@ -2346,17 +2352,6 @@ 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, attrChanges);
|
||||
|
||||
if ((result & WindowManagerGlobal.RELAYOUT_RES_FIRST_TIME) != 0) {
|
||||
focusMayChange = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user