From 3ec891ae8067dd7afac5c0b5a8af0b726f4a4726 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 25 Oct 2011 13:58:30 -0700 Subject: [PATCH] Fix issue #5508024: Rotation jank seen in live wallpapers Fix a few places where we would unfreeze the screen too early. Now that we are no longer relying on surface flinger freezing, we can't depend on it keeping the screen frozen until surfaces get drawn. Change-Id: Icb03bf30c9599a5e2016817bfa5ca6458adc7249 --- .../server/wm/WindowManagerService.java | 49 ++++++++++++------- .../com/android/server/wm/WindowState.java | 5 +- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java index 3af3e06d3b368..a199a7e0ea073 100644 --- a/services/java/com/android/server/wm/WindowManagerService.java +++ b/services/java/com/android/server/wm/WindowManagerService.java @@ -3973,6 +3973,7 @@ public class WindowManagerService extends IWindowManager.Stub if (w.mAppFreezing) { w.mAppFreezing = false; if (w.mSurface != null && !w.mOrientationChanging) { + if (DEBUG_ORIENTATION) Slog.v(TAG, "set mOrientationChanging of " + w); w.mOrientationChanging = true; } unfrozeWindows = true; @@ -5106,7 +5107,7 @@ public class WindowManagerService extends IWindowManager.Stub } if (rawss == null) { - Log.w(TAG, "Failure taking screenshot for (" + dw + "x" + dh + Slog.w(TAG, "Failure taking screenshot for (" + dw + "x" + dh + ") to layer " + maxLayer); return null; } @@ -5312,6 +5313,7 @@ public class WindowManagerService extends IWindowManager.Stub for (int i=mWindows.size()-1; i>=0; i--) { WindowState w = mWindows.get(i); if (w.mSurface != null) { + if (DEBUG_ORIENTATION) Slog.v(TAG, "Set mOrientationChanging of " + w); w.mOrientationChanging = true; } } @@ -7128,7 +7130,7 @@ public class WindowManagerService extends IWindowManager.Stub if (DEBUG_LAYERS) { RuntimeException here = new RuntimeException("here"); here.fillInStackTrace(); - Log.v(TAG, "Assigning layers", here); + Slog.v(TAG, "Assigning layers", here); } for (i=0; i