summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tiger Huang <tigerhuang@google.com> 2021-04-12 19:51:43 +0000
committer Tiger Huang <tigerhuang@google.com> 2021-04-12 19:51:43 +0000
commit1efc2a70b20f875bed96f12e79e358dadee19dae (patch)
tree64d8f0e990102db1d77133d39e7877b60b5e8cfb
parentfa17d6ca37b3f434e05e286fb5f828b28bbca93b (diff)
Revert "Clear controls and animations in temp arrays after using them"
This reverts commit fa17d6ca37b3f434e05e286fb5f828b28bbca93b. Reason for revert: b/185097067 The original CL makes WindowInsetsAnimationImeTests fail Change-Id: I5ffffd613e6efcd805730825318d7a83bc9babaf
-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 b97c63884f48..c001ec9da3a4 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();
};
}