From 198e564c9a66010cfe93e0b1a75f84d696bda494 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Thu, 10 May 2012 09:55:15 -0700 Subject: [PATCH] Notify windows when window animations complete Drawing in windows is suppressed during window animations, to make window animations smoother. This means that drawing activities that the activity requested are dropped on the floor. There is no call at the end of window animations to tell the windows that they may now draw, which leaves the windows and activities in an uncertain state, especially with respect to some of the dirty flags that we use internally to know when we have requested (and satisfied) invalidations on views. The fix is to notice, on the WindowManager side, when we've finished window animations and to schedule a traversal on the WindowManager, which will then send out appropriate messages to the affected windows. Issue #6461113 EventInfo is stuck in day view Change-Id: I364c9c472531c467d44801698cfb453970173bb3 --- services/java/com/android/server/wm/WindowAnimator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/java/com/android/server/wm/WindowAnimator.java b/services/java/com/android/server/wm/WindowAnimator.java index 55365597eb8ea..87442df20a33d 100644 --- a/services/java/com/android/server/wm/WindowAnimator.java +++ b/services/java/com/android/server/wm/WindowAnimator.java @@ -454,6 +454,7 @@ public class WindowAnimator { mPendingLayoutChanges = 0; mCurrentTime = SystemClock.uptimeMillis(); mBulkUpdateParams = 0; + boolean wasAnimating = mAnimating; mAnimating = false; if (WindowManagerService.DEBUG_WINDOW_TRACE) { Slog.i(TAG, "!!! animate: entry time=" + mCurrentTime); @@ -509,6 +510,8 @@ public class WindowAnimator { if (mAnimating) { mService.scheduleAnimationLocked(); + } else if (wasAnimating) { + mService.requestTraversalLocked(); } if (WindowManagerService.DEBUG_WINDOW_TRACE) { Slog.i(TAG, "!!! animate: exit mAnimating=" + mAnimating