Merge "Create surfacecontrol before layout in relayoutWindow" into sc-dev
This commit is contained in:
@@ -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
|
// Create surfaceControl before surface placement otherwise layout will be skipped
|
||||||
// in the new out values right now we need to force a layout.
|
// (because WS.isGoneForLayout() is true when there is no surface.
|
||||||
mWindowPlacerLocked.performSurfacePlacement(true /* force */);
|
|
||||||
|
|
||||||
if (shouldRelayout) {
|
if (shouldRelayout) {
|
||||||
Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "relayoutWindow: viewVisibility_1");
|
|
||||||
|
|
||||||
result = win.relayoutVisibleWindow(result);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
result = createSurfaceControl(outSurfaceControl, result, win, winAnimator);
|
result = createSurfaceControl(outSurfaceControl, result, win, winAnimator);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -2413,6 +2407,17 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
Binder.restoreCallingIdentity(origId);
|
Binder.restoreCallingIdentity(origId);
|
||||||
return 0;
|
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) {
|
if ((result & WindowManagerGlobal.RELAYOUT_RES_FIRST_TIME) != 0) {
|
||||||
focusMayChange = true;
|
focusMayChange = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user