Skip to content

Commit 06a94f7

Browse files
author
Craig Mautner
committed
Track animating apps up until animation starts.
ActivityStack sets the mNextAppTransition value before moving the apps to their proper position. This makes the test for mNextAppTransition being TRANSITION_UNSET incorrect. Better to just look for animating. Fixes bug 6565418. Change-Id: I4651b7d3678e46fc712a8e901992fb01b94c415e
1 parent 6385ff5 commit 06a94f7

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3544,7 +3544,8 @@ public void addAppToken(int addPos, IApplicationToken token,
35443544
wtoken.groupId = groupId;
35453545
wtoken.appFullscreen = fullscreen;
35463546
wtoken.requestedOrientation = requestedOrientation;
3547-
if (DEBUG_TOKEN_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG, "addAppToken: " + wtoken);
3547+
if (DEBUG_TOKEN_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG, "addAppToken: " + wtoken
3548+
+ " at " + addPos);
35483549
mAppTokens.add(addPos, wtoken);
35493550
addAppTokenToAnimating(addPos, wtoken);
35503551
mTokenMap.put(token.asBinder(), wtoken);
@@ -4816,8 +4817,7 @@ public void moveAppTokensToTop(List<IBinder> tokens) {
48164817
}
48174818
}
48184819

4819-
if (mNextAppTransition == WindowManagerPolicy.TRANSIT_UNSET
4820-
&& !mAppTransitionRunning) {
4820+
if (!mAppTransitionRunning) {
48214821
mAnimatingAppTokens.clear();
48224822
mAnimatingAppTokens.addAll(mAppTokens);
48234823
moveAppWindowsLocked(tokens, mAppTokens.size());
@@ -4836,8 +4836,7 @@ public void moveAppTokensToBottom(List<IBinder> tokens) {
48364836
final long origId = Binder.clearCallingIdentity();
48374837
synchronized(mWindowMap) {
48384838
final int N = tokens.size();
4839-
if (N > 0 && mNextAppTransition != WindowManagerPolicy.TRANSIT_UNSET
4840-
&& !mAppTransitionRunning) {
4839+
if (N > 0 && !mAppTransitionRunning) {
48414840
// animating towards back, hang onto old list for duration of animation.
48424841
mAnimatingAppTokens.clear();
48434842
mAnimatingAppTokens.addAll(mAppTokens);
@@ -4857,8 +4856,7 @@ public void moveAppTokensToBottom(List<IBinder> tokens) {
48574856
}
48584857
}
48594858

4860-
if (mNextAppTransition == WindowManagerPolicy.TRANSIT_UNSET
4861-
&& !mAppTransitionRunning) {
4859+
if (!mAppTransitionRunning) {
48624860
mAnimatingAppTokens.clear();
48634861
mAnimatingAppTokens.addAll(mAppTokens);
48644862
moveAppWindowsLocked(tokens, 0);

0 commit comments

Comments
 (0)