From 41d3a2a1d7d249f42aef5dbb443b10f6337fd87c Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 8 May 2019 15:21:21 -0700 Subject: Fix bug skipping certain animations from ending endAnimations forces an end to all running animations. This also removes it from the list which changes the list while we're iterating over it. This fixes the issue. Bug: 132285006 Test: Manual test w/ build forcing endAnimations Change-Id: I0ee9917866dafe00ef3122dd9a43259d19fb9f79 --- go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'go/quickstep/src/com') diff --git a/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java b/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java index 928234553..87ae6955e 100644 --- a/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java +++ b/go/quickstep/src/com/android/quickstep/ContentFillItemAnimator.java @@ -250,7 +250,7 @@ public final class ContentFillItemAnimator extends SimpleItemAnimator { } mPendingAnims.remove(i); } - for (int i = 0; i < mRunningAnims.size(); i++) { + for (int i = mRunningAnims.size() - 1; i >= 0; i--) { ObjectAnimator anim = mRunningAnims.get(i); anim.end(); } -- cgit v1.2.3