From 9cceae9a5f4a2e8b5abc7dc9610dc7e40c7d283c Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Tue, 30 Oct 2012 16:35:45 -0700 Subject: 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 --- services/java/com/android/server/wm/WindowManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 9511a1a951f8..209cad17974c 100755 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -8376,7 +8376,7 @@ public class WindowManagerService extends IWindowManager.Stub // windows, since that means "perform layout as normal, // just don't display"). if (!gone || !win.mHaveFrame || win.mLayoutNeeded - || win.isConfigChanged() + || (win.mAttrs.type == TYPE_KEYGUARD && win.isConfigChanged()) || win.mAttrs.type == TYPE_UNIVERSE_BACKGROUND) { if (!win.mLayoutAttached) { if (initial) { -- cgit v1.2.3-59-g8ed1b