summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2021-04-13 02:21:57 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-04-13 02:21:57 +0000
commit5a71c4f7fac83d6d5e332a5164fb8728f64c6ffb (patch)
treefe1b259e8842ced7d00bdfb7f2ca49008050c9ca
parenta77a0600cf0e7dbf4b28131cf676a97ed32fc622 (diff)
parent1efc2a70b20f875bed96f12e79e358dadee19dae (diff)
Merge "Revert "Clear controls and animations in temp arrays after using them"" into sc-dev
-rw-r--r--core/java/android/view/InsetsController.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/view/InsetsController.java b/core/java/android/view/InsetsController.java
index b6b8a2daf160..c201e3beb9b2 100644
--- a/core/java/android/view/InsetsController.java
+++ b/core/java/android/view/InsetsController.java
@@ -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();
};
}