From 8efb0a4d811fc18ac8ef32f7d597aa6fafb3acec Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Thu, 8 Aug 2013 14:59:00 -0700 Subject: [PATCH] Add extra layout pass after draw finished. Once content has been drawn another pass through layout is required to set mHasContent in the LogicalDisplay. Previously this pass was occuring because of a delayed animation step. When timing of that step changed that pass occurred before the draw completed. This is why Presentations were immediately displayed in jb-mr1 and not jb-mr2. Fixes bug 10154780. Change-Id: I0075c5a73d5cdf972e73fdd59c1fde46df64e245 --- services/java/com/android/server/wm/WindowStateAnimator.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/java/com/android/server/wm/WindowStateAnimator.java b/services/java/com/android/server/wm/WindowStateAnimator.java index 6fa9cd0c75768..73325cbf5afcb 100644 --- a/services/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/java/com/android/server/wm/WindowStateAnimator.java @@ -1272,6 +1272,11 @@ class WindowStateAnimator { if (mIsWallpaper) { mService.dispatchWallpaperVisibility(w, true); } + // This draw means the difference between unique content and mirroring. + // Run another pass through performLayout to set mHasContent in the + // LogicalDisplay. + mAnimator.setPendingLayoutChanges(w.getDisplayId(), + WindowManagerPolicy.FINISH_LAYOUT_REDO_ANIM); } else { w.mOrientationChanging = false; }