summaryrefslogtreecommitdiffstats
path: root/services/java
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2012-10-31 08:57:17 -0700
committerChet Haase <chet@google.com>2012-10-31 15:40:54 -0700
commitd5d11af3d3cefff6267d4e3a19e61a9b03cfbab5 (patch)
tree9488b913768bd292455bc87ade970f1919a4e304 /services/java
parent86e1b96666af3693ec1bf220272fbc90d73d3cde (diff)
downloadframeworks_base-d5d11af3d3cefff6267d4e3a19e61a9b03cfbab5.zip
frameworks_base-d5d11af3d3cefff6267d4e3a19e61a9b03cfbab5.tar.gz
frameworks_base-d5d11af3d3cefff6267d4e3a19e61a9b03cfbab5.tar.bz2
Fix for regression in WindowManager orientation changes
A fix yesterday for #7428221 caused a regression where new orientations would sometimes cause a flash through black on the way to seeing the real static wallpaper. There is a fundamental problem in WindowManagerService where we show a window before it has all of the layout/sizing information it needs, which is the cause of the black flash. The regression yesterday was that we are now less aggressive about layout out hidden windows, so we won't layout the window until after the window is shown with the incorrect sizing info. The fix/workaround is to back off the layout logic specifically for the wallpaper, ensuring that we will lay it out on orientation changes, even when hidden. This means that when we finally do show it, it will already have been drawn in the correct orientation/size. Issue #7444971 Home jank regression Change-Id: Ib20fdabc43ece9720b261bf04b272c5511e2d902
Diffstat (limited to 'services/java')
-rwxr-xr-xservices/java/com/android/server/wm/WindowManagerService.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 3532c0c..7958f9a 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -2773,7 +2773,7 @@ public class WindowManagerService extends IWindowManager.Stub
// TODO: Remove once b/7094175 is fixed
|| ((String)win.mAttrs.getTitle()).contains("Keyguard")
) Slog.v(TAG, "Relayout " + win + ": viewVisibility=" + viewVisibility
- + " " + requestedWidth + "x" + requestedHeight + " " + win.mAttrs);
+ + " req=" + requestedWidth + "x" + requestedHeight + " " + win.mAttrs);
win.mEnforceSizeCompat = (win.mAttrs.flags & FLAG_COMPATIBLE_WINDOW) != 0;
@@ -3003,6 +3003,10 @@ public class WindowManagerService extends IWindowManager.Stub
}
mInputMonitor.updateInputWindowsLw(true /*force*/);
+
+ if (DEBUG_LAYOUT) {
+ Slog.v(TAG, "Relayout complete " + win + ": outFrame=" + outFrame.toShortString());
+ }
}
if (configChanged) {
@@ -8379,7 +8383,8 @@ 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.mAttrs.type == TYPE_KEYGUARD && win.isConfigChanged())
+ || ((win.mAttrs.type == TYPE_KEYGUARD || win.mAttrs.type == TYPE_WALLPAPER) &&
+ win.isConfigChanged())
|| win.mAttrs.type == TYPE_UNIVERSE_BACKGROUND) {
if (!win.mLayoutAttached) {
if (initial) {
@@ -9301,6 +9306,8 @@ public class WindowManagerService extends IWindowManager.Stub
Log.wtf(TAG, "Unhandled exception in Window Manager", e);
} finally {
Surface.closeTransaction();
+ if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
+ "<<< CLOSE TRANSACTION performLayoutAndPlaceSurfaces");
}
final WindowList defaultWindows = defaultDisplay.getWindowList();