Loading services/core/java/com/android/server/wm/WindowManagerService.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -3161,6 +3161,11 @@ public class WindowManagerService extends IWindowManager.Stub // Reparent the window created for this window context. // Reparent the window created for this window context. dc.reParentWindowToken(token); dc.reParentWindowToken(token); hideUntilNextDraw(token); hideUntilNextDraw(token); // Prevent a race condition where VRI temporarily reverts the context display ID // before the onDisplayMoved callback arrives. This caused incorrect display IDs // during configuration changes, breaking SysUI layouts dependent on it. // Forcing a resize report ensures VRI has the correct ID before the update. forceReportResizing(token); // This makes sure there is a traversal scheduled that will eventually report // This makes sure there is a traversal scheduled that will eventually report // the window resize to the client. // the window resize to the client. dc.setLayoutNeeded(); dc.setLayoutNeeded(); Loading @@ -3182,6 +3187,14 @@ public class WindowManagerService extends IWindowManager.Stub } } } } private void forceReportResizing(@NonNull WindowContainer<?> wc) { wc.forAllWindows(w -> { if (!mResizingWindows.contains(w)) { mResizingWindows.add(w); } }, true /* traverseTopToBottom */); } private void hideUntilNextDraw(@NonNull WindowToken token) { private void hideUntilNextDraw(@NonNull WindowToken token) { final WindowState topChild = token.getTopChild(); final WindowState topChild = token.getTopChild(); if (topChild != null) { if (topChild != null) { Loading Loading
services/core/java/com/android/server/wm/WindowManagerService.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -3161,6 +3161,11 @@ public class WindowManagerService extends IWindowManager.Stub // Reparent the window created for this window context. // Reparent the window created for this window context. dc.reParentWindowToken(token); dc.reParentWindowToken(token); hideUntilNextDraw(token); hideUntilNextDraw(token); // Prevent a race condition where VRI temporarily reverts the context display ID // before the onDisplayMoved callback arrives. This caused incorrect display IDs // during configuration changes, breaking SysUI layouts dependent on it. // Forcing a resize report ensures VRI has the correct ID before the update. forceReportResizing(token); // This makes sure there is a traversal scheduled that will eventually report // This makes sure there is a traversal scheduled that will eventually report // the window resize to the client. // the window resize to the client. dc.setLayoutNeeded(); dc.setLayoutNeeded(); Loading @@ -3182,6 +3187,14 @@ public class WindowManagerService extends IWindowManager.Stub } } } } private void forceReportResizing(@NonNull WindowContainer<?> wc) { wc.forAllWindows(w -> { if (!mResizingWindows.contains(w)) { mResizingWindows.add(w); } }, true /* traverseTopToBottom */); } private void hideUntilNextDraw(@NonNull WindowToken token) { private void hideUntilNextDraw(@NonNull WindowToken token) { final WindowState topChild = token.getTopChild(); final WindowState topChild = token.getTopChild(); if (topChild != null) { if (topChild != null) { Loading