Skip to content

Commit 692fda9

Browse files
chethaaseAndroid (Google) Code Review
authored andcommitted
Merge "Fix leak in LayoutTransition" into ics-mr1
2 parents 7c9f800 + 8a22e59 commit 692fda9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

core/java/android/animation/LayoutTransition.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,15 @@ public void setAnimateParentHierarchy(boolean animateParentHierarchy) {
657657
*/
658658
private void setupChangeAnimation(final ViewGroup parent, final int changeReason,
659659
Animator baseAnimator, final long duration, final View child) {
660+
661+
// If we already have a listener for this child, then we've already set up the
662+
// changing animation we need. Multiple calls for a child may occur when several
663+
// add/remove operations are run at once on a container; each one will trigger
664+
// changes for the existing children in the container.
665+
if (layoutChangeListenerMap.get(child) != null) {
666+
return;
667+
}
668+
660669
// Make a copy of the appropriate animation
661670
final Animator anim = baseAnimator.clone();
662671

0 commit comments

Comments
 (0)