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
diff --git a/services/java/com/android/server/wm/WindowAnimator.java b/services/java/com/android/server/wm/WindowAnimator.java
index 5536559..87442df 100644
--- a/services/java/com/android/server/wm/WindowAnimator.java
+++ b/services/java/com/android/server/wm/WindowAnimator.java
@@ -454,6 +454,7 @@
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 @@
if (mAnimating) {
mService.scheduleAnimationLocked();
+ } else if (wasAnimating) {
+ mService.requestTraversalLocked();
}
if (WindowManagerService.DEBUG_WINDOW_TRACE) {
Slog.i(TAG, "!!! animate: exit mAnimating=" + mAnimating