Skip to content

Commit 9cceae9

Browse files
committed
WindowManager shouldn't layout non-visible windows
A recent change in WindowManager made background windows perform layout (when they should really be left alone). This resulted in artifacts where rotating the device and then going to a backgrojnd activity (launcher, Recents) would briefly show that activity in the wrong size/orientation, then flash to the correct one after a proper layout. This fix is a simple workaround, leaving in the original fix that the code change addressed (for keyguard orientation changes), while going back to the previous (don't layout gone windows) for all other cases. Issue #7428221 sometimes recents is drawn off-center and then fixes itself Change-Id: I41b47933c2bd86f29133853d3387bb7294be8f48
1 parent 33c0a61 commit 9cceae9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8376,7 +8376,7 @@ private final void performLayoutLockedInner(final DisplayContent displayContent,
83768376
// windows, since that means "perform layout as normal,
83778377
// just don't display").
83788378
if (!gone || !win.mHaveFrame || win.mLayoutNeeded
8379-
|| win.isConfigChanged()
8379+
|| (win.mAttrs.type == TYPE_KEYGUARD && win.isConfigChanged())
83808380
|| win.mAttrs.type == TYPE_UNIVERSE_BACKGROUND) {
83818381
if (!win.mLayoutAttached) {
83828382
if (initial) {

0 commit comments

Comments
 (0)