Skip to content

Commit ef25d7a

Browse files
author
Craig Mautner
committed
Change method of tracking moving AppWindowTokens.
Stop trying to keep track of the AppTokens that have been moved to the top and bottom and then try and match the WindowStates when transitions are goodToGo. Instead rebuild the WindowState order based on the AppToken order when we are goodToGo. When moving AppWindowTokens lower in mAppTokens create a new ArrayList of AppWindowTokens to keep track of the apps in Z order while animating. Fixes bug 6481078. Change-Id: I29b33a507b45752f15feb10a9f4b47a3f5eb9f0e
1 parent ae14715 commit ef25d7a

File tree

5 files changed

+146
-105
lines changed

5 files changed

+146
-105
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,11 @@ private void testWallpaperAndBackgroundLocked() {
134134
}
135135

136136
private void updateWindowsAppsAndRotationAnimationsLocked() {
137+
final ArrayList<AppWindowToken> appTokens = mService.mAnimatingAppTokens;
137138
int i;
138-
final int NAT = mService.mAppTokens.size();
139+
final int NAT = appTokens.size();
139140
for (i=0; i<NAT; i++) {
140-
final AppWindowAnimator appAnimator = mService.mAppTokens.get(i).mAppAnimator;
141+
final AppWindowAnimator appAnimator = appTokens.get(i).mAppAnimator;
141142
final boolean wasAnimating = appAnimator.animation != null
142143
&& appAnimator.animation != AppWindowAnimator.sDummyAnimation;
143144
if (appAnimator.stepAnimationLocked(mCurrentTime, mInnerDw, mInnerDh)) {
@@ -391,9 +392,10 @@ private void updateWindowsAndWallpaperLocked() {
391392
private void testTokenMayBeDrawnLocked() {
392393
// See if any windows have been drawn, so they (and others
393394
// associated with them) can now be shown.
394-
final int NT = mService.mAppTokens.size();
395+
final ArrayList<AppWindowToken> appTokens = mService.mAnimatingAppTokens;
396+
final int NT = appTokens.size();
395397
for (int i=0; i<NT; i++) {
396-
AppWindowToken wtoken = mService.mAppTokens.get(i);
398+
AppWindowToken wtoken = appTokens.get(i);
397399
if (wtoken.mAppAnimator.freezingScreen) {
398400
int numInteresting = wtoken.numInterestingWindows;
399401
if (numInteresting > 0 && wtoken.numDrawnWindows >= numInteresting) {

0 commit comments

Comments
 (0)