Skip to content

Commit c383580

Browse files
Craig MautnerAndroid (Google) Code Review
authored andcommitted
Merge changes I08fcd278,I1f496bb7
* changes: Detect animation completions like we used to. Previous approximations weren't indicating completion and windows weren't being layered correctly as a result. debug
2 parents 9f77932 + 343511c commit c383580

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7685,8 +7685,6 @@ private int updateWindowsAndWallpaperLocked(final long currentTime, final int dw
76857685
}
76867686
}
76877687

7688-
final boolean wasAnimating = w.mWasAnimating;
7689-
76907688
// If the window has moved due to its containing
76917689
// content frame changing, then we'd like to animate
76927690
// it. The checks here are ordered by what is least
@@ -7705,8 +7703,13 @@ private int updateWindowsAndWallpaperLocked(final long currentTime, final int dw
77057703
w.mAnimDh = innerDh;
77067704
}
77077705

7708-
// Execute animation.
7709-
final boolean nowAnimating = w.isAnimating();
7706+
final boolean wasAnimating = w.mWasAnimating;
7707+
final boolean nowAnimating = w.mLocalAnimating;
7708+
7709+
if (DEBUG_WALLPAPER) {
7710+
Slog.v(TAG, w + ": wasAnimating=" + wasAnimating +
7711+
", nowAnimating=" + nowAnimating);
7712+
}
77107713

77117714
// If this window is animating, make a note that we have
77127715
// an animating window and take care of a request to run

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ boolean performShowLocked() {
982982
boolean stepAnimationLocked(long currentTime) {
983983
// Save the animation state as it was before this step so WindowManagerService can tell if
984984
// we just started or just stopped animating by comparing mWasAnimating with isAnimating().
985-
mWasAnimating = isAnimating();
985+
mWasAnimating = mAnimating;
986986
if (!mService.mDisplayFrozen && mService.mPolicy.isScreenOnFully()) {
987987
// We will run animations as long as the display isn't frozen.
988988

0 commit comments

Comments
 (0)