Loading services/core/java/com/android/server/wm/Task.java +3 −0 Original line number Diff line number Diff line Loading @@ -4563,7 +4563,10 @@ class Task extends TaskFragment { } final WindowState w = getTopVisibleAppMainWindow(); if (w != null) { w.mIsSurfacePositionPaused = true; w.applyWithNextDraw((d) -> { w.mIsSurfacePositionPaused = false; w.updateSurfacePosition(d); d.merge(t); }); } else { Loading services/core/java/com/android/server/wm/WindowManagerService.java +0 −3 Original line number Diff line number Diff line Loading @@ -2645,9 +2645,6 @@ public class WindowManagerService extends IWindowManager.Stub if (displayPolicy.areSystemBarsForcedConsumedLw()) { result |= WindowManagerGlobal.RELAYOUT_RES_CONSUME_ALWAYS_SYSTEM_BARS; } if (!win.isGoneForLayout()) { win.mResizedWhileGone = false; } if (outFrames != null && outMergedConfiguration != null) { final boolean shouldReportActivityWindowInfo; Loading services/core/java/com/android/server/wm/WindowOrganizerController.java +6 −5 Original line number Diff line number Diff line Loading @@ -839,9 +839,14 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub } private int applyTaskChanges(Task tr, WindowContainerTransaction.Change c) { int effects = applyChanges(tr, c); final SurfaceControl.Transaction t = c.getBoundsChangeTransaction(); // Check bounds change transaction at the beginning because it may pause updating window // surface position. Then the following changes won't apply intermediate position. if (t != null) { tr.setMainWindowSizeChangeTransaction(t); } int effects = applyChanges(tr, c); if ((c.getChangeMask() & WindowContainerTransaction.Change.CHANGE_HIDDEN) != 0) { if (tr.setForceHidden(FLAG_FORCE_HIDDEN_FOR_TASK_ORG, c.getHidden())) { effects |= TRANSACT_EFFECTS_LIFECYCLE; Loading Loading @@ -874,10 +879,6 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub tr.forAllActivities(a -> { a.setWindowingMode(childWindowingMode); }); } if (t != null) { tr.setMainWindowSizeChangeTransaction(t); } Rect enterPipBounds = c.getEnterPipBounds(); if (enterPipBounds != null) { tr.mDisplayContent.mPinnedTaskController.setEnterPipBounds(enterPipBounds); Loading services/core/java/com/android/server/wm/WindowState.java +7 −6 Original line number Diff line number Diff line Loading @@ -670,9 +670,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP private final Transaction mTmpTransaction; /** * Whether the window was resized by us while it was gone for layout. * Whether the surface position of window is paused to update. Currently it is only used for * {@link Task#setMainWindowSizeChangeTransaction(Transaction)} to synchronize position. */ boolean mResizedWhileGone = false; boolean mIsSurfacePositionPaused; /** * During seamless rotation we have two phases, first the old window contents Loading Loading @@ -2192,9 +2193,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP ProtoLog.d(WM_DEBUG_RESIZE, "onResize: Resizing %s", this); resizingWindows.add(this); } if (isGoneForLayout()) { mResizedWhileGone = true; } super.onResize(); } Loading Loading @@ -4191,6 +4189,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP pw.println(prefix + "mHasSurface=" + mHasSurface + " isReadyForDisplay()=" + isReadyForDisplay() + " mWindowRemovalAllowed=" + mWindowRemovalAllowed); if (mIsSurfacePositionPaused) { pw.println(prefix + "mIsSurfacePositionPaused=true"); } if (mInvGlobalScale != 1f) { pw.println(prefix + "mCompatFrame=" + mWindowFrames.mCompatFrame.toShortString(sTmpSB)); } Loading Loading @@ -5283,7 +5284,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP @Override @VisibleForTesting void updateSurfacePosition(Transaction t) { if (mSurfaceControl == null) { if (mSurfaceControl == null || mIsSurfacePositionPaused) { return; } if (mActivityRecord != null && mActivityRecord.isConfigurationDispatchPaused()) { Loading Loading
services/core/java/com/android/server/wm/Task.java +3 −0 Original line number Diff line number Diff line Loading @@ -4563,7 +4563,10 @@ class Task extends TaskFragment { } final WindowState w = getTopVisibleAppMainWindow(); if (w != null) { w.mIsSurfacePositionPaused = true; w.applyWithNextDraw((d) -> { w.mIsSurfacePositionPaused = false; w.updateSurfacePosition(d); d.merge(t); }); } else { Loading
services/core/java/com/android/server/wm/WindowManagerService.java +0 −3 Original line number Diff line number Diff line Loading @@ -2645,9 +2645,6 @@ public class WindowManagerService extends IWindowManager.Stub if (displayPolicy.areSystemBarsForcedConsumedLw()) { result |= WindowManagerGlobal.RELAYOUT_RES_CONSUME_ALWAYS_SYSTEM_BARS; } if (!win.isGoneForLayout()) { win.mResizedWhileGone = false; } if (outFrames != null && outMergedConfiguration != null) { final boolean shouldReportActivityWindowInfo; Loading
services/core/java/com/android/server/wm/WindowOrganizerController.java +6 −5 Original line number Diff line number Diff line Loading @@ -839,9 +839,14 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub } private int applyTaskChanges(Task tr, WindowContainerTransaction.Change c) { int effects = applyChanges(tr, c); final SurfaceControl.Transaction t = c.getBoundsChangeTransaction(); // Check bounds change transaction at the beginning because it may pause updating window // surface position. Then the following changes won't apply intermediate position. if (t != null) { tr.setMainWindowSizeChangeTransaction(t); } int effects = applyChanges(tr, c); if ((c.getChangeMask() & WindowContainerTransaction.Change.CHANGE_HIDDEN) != 0) { if (tr.setForceHidden(FLAG_FORCE_HIDDEN_FOR_TASK_ORG, c.getHidden())) { effects |= TRANSACT_EFFECTS_LIFECYCLE; Loading Loading @@ -874,10 +879,6 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub tr.forAllActivities(a -> { a.setWindowingMode(childWindowingMode); }); } if (t != null) { tr.setMainWindowSizeChangeTransaction(t); } Rect enterPipBounds = c.getEnterPipBounds(); if (enterPipBounds != null) { tr.mDisplayContent.mPinnedTaskController.setEnterPipBounds(enterPipBounds); Loading
services/core/java/com/android/server/wm/WindowState.java +7 −6 Original line number Diff line number Diff line Loading @@ -670,9 +670,10 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP private final Transaction mTmpTransaction; /** * Whether the window was resized by us while it was gone for layout. * Whether the surface position of window is paused to update. Currently it is only used for * {@link Task#setMainWindowSizeChangeTransaction(Transaction)} to synchronize position. */ boolean mResizedWhileGone = false; boolean mIsSurfacePositionPaused; /** * During seamless rotation we have two phases, first the old window contents Loading Loading @@ -2192,9 +2193,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP ProtoLog.d(WM_DEBUG_RESIZE, "onResize: Resizing %s", this); resizingWindows.add(this); } if (isGoneForLayout()) { mResizedWhileGone = true; } super.onResize(); } Loading Loading @@ -4191,6 +4189,9 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP pw.println(prefix + "mHasSurface=" + mHasSurface + " isReadyForDisplay()=" + isReadyForDisplay() + " mWindowRemovalAllowed=" + mWindowRemovalAllowed); if (mIsSurfacePositionPaused) { pw.println(prefix + "mIsSurfacePositionPaused=true"); } if (mInvGlobalScale != 1f) { pw.println(prefix + "mCompatFrame=" + mWindowFrames.mCompatFrame.toShortString(sTmpSB)); } Loading Loading @@ -5283,7 +5284,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP @Override @VisibleForTesting void updateSurfacePosition(Transaction t) { if (mSurfaceControl == null) { if (mSurfaceControl == null || mIsSurfacePositionPaused) { return; } if (mActivityRecord != null && mActivityRecord.isConfigurationDispatchPaused()) { Loading