Merge "Revert "Clear controls and animations in temp arrays after using them"" into sc-dev am: 5a71c4f7fa

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14161093

Change-Id: I09dc7fb29bcb927c30bff2c4671c842811d9b2b4
This commit is contained in:
Riddle Hsu
2021-04-13 02:41:55 +00:00
committed by Automerger Merge Worker

View File

@@ -601,6 +601,8 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
return;
}
mTmpFinishedControls.clear();
mTmpRunningAnims.clear();
InsetsState state = new InsetsState(mState, true /* copySources */);
for (int i = mRunningAnimations.size() - 1; i >= 0; i--) {
RunningAnimation runningAnimation = mRunningAnimations.get(i);
@@ -633,12 +635,10 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
anim.getTypeMask(), anim.getInterpolatedFraction()));
}
}
mTmpRunningAnims.clear();
for (int i = mTmpFinishedControls.size() - 1; i >= 0; i--) {
dispatchAnimationEnd(mTmpFinishedControls.get(i).getAnimation());
}
mTmpFinishedControls.clear();
};
}