Skip to content

Commit 198e564

Browse files
committed
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
1 parent 2f4b10e commit 198e564

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

services/java/com/android/server/wm/WindowAnimator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ synchronized void animate() {
454454
mPendingLayoutChanges = 0;
455455
mCurrentTime = SystemClock.uptimeMillis();
456456
mBulkUpdateParams = 0;
457+
boolean wasAnimating = mAnimating;
457458
mAnimating = false;
458459
if (WindowManagerService.DEBUG_WINDOW_TRACE) {
459460
Slog.i(TAG, "!!! animate: entry time=" + mCurrentTime);
@@ -509,6 +510,8 @@ synchronized void animate() {
509510

510511
if (mAnimating) {
511512
mService.scheduleAnimationLocked();
513+
} else if (wasAnimating) {
514+
mService.requestTraversalLocked();
512515
}
513516
if (WindowManagerService.DEBUG_WINDOW_TRACE) {
514517
Slog.i(TAG, "!!! animate: exit mAnimating=" + mAnimating

0 commit comments

Comments
 (0)