Copy exiting app token list while stepping animation.
am: 46831fa9ff
Change-Id: I53c41afd54b9a315a0734dce357b1eef8485b84b
This commit is contained in:
@@ -119,6 +119,8 @@ public class WindowAnimator {
|
|||||||
// check if some got replaced and can be removed.
|
// check if some got replaced and can be removed.
|
||||||
private boolean mRemoveReplacedWindows = false;
|
private boolean mRemoveReplacedWindows = false;
|
||||||
|
|
||||||
|
private final AppTokenList mTmpExitingAppTokens = new AppTokenList();
|
||||||
|
|
||||||
private String forceHidingToString() {
|
private String forceHidingToString() {
|
||||||
switch (mForceHiding) {
|
switch (mForceHiding) {
|
||||||
case KEYGUARD_NOT_SHOWN: return "KEYGUARD_NOT_SHOWN";
|
case KEYGUARD_NOT_SHOWN: return "KEYGUARD_NOT_SHOWN";
|
||||||
@@ -189,10 +191,19 @@ public class WindowAnimator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final AppTokenList exitingAppTokens = stack.mExitingAppTokens;
|
mTmpExitingAppTokens.clear();
|
||||||
final int exitingCount = exitingAppTokens.size();
|
mTmpExitingAppTokens.addAll(stack.mExitingAppTokens);
|
||||||
|
|
||||||
|
final int exitingCount = mTmpExitingAppTokens.size();
|
||||||
for (int i = 0; i < exitingCount; i++) {
|
for (int i = 0; i < exitingCount; i++) {
|
||||||
final AppWindowAnimator appAnimator = exitingAppTokens.get(i).mAppAnimator;
|
final AppWindowAnimator appAnimator = mTmpExitingAppTokens.get(i).mAppAnimator;
|
||||||
|
// stepAnimation can trigger finishExit->removeWindowInnerLocked
|
||||||
|
// ->performSurfacePlacement
|
||||||
|
// performSurfacePlacement will directly manipulate the mExitingAppTokens list
|
||||||
|
// so we need to iterate over a copy and check for modifications.
|
||||||
|
if (!stack.mExitingAppTokens.contains(appAnimator)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
appAnimator.wasAnimating = appAnimator.animating;
|
appAnimator.wasAnimating = appAnimator.animating;
|
||||||
if (appAnimator.stepAnimationLocked(mCurrentTime, displayId)) {
|
if (appAnimator.stepAnimationLocked(mCurrentTime, displayId)) {
|
||||||
setAnimating(true);
|
setAnimating(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user