Loading core/java/android/animation/AnimatorSet.java +10 −10 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim // This is to work around a bug in b/34736819. This needs to be removed once app team // fixes their side. private AnimatorListenerAdapter mDummyListener = new AnimatorListenerAdapter() { private AnimatorListenerAdapter mAnimationEndingListener = new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { if (mNodeMap.get(animation) == null) { Loading Loading @@ -1186,7 +1186,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim } private void startAnimation() { addDummyListener(); addAnimationEndingListener(); // Register animation callback addAnimationCallback(0); Loading Loading @@ -1243,15 +1243,15 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim // This is to work around the issue in b/34736819, as the old behavior in AnimatorSet had // masked a real bug in play movies. TODO: remove this and below once the root cause is fixed. private void addDummyListener() { private void addAnimationEndingListener() { for (int i = 1; i < mNodes.size(); i++) { mNodes.get(i).mAnimation.addListener(mDummyListener); mNodes.get(i).mAnimation.addListener(mAnimationEndingListener); } } private void removeDummyListener() { private void removeAnimationEndingListener() { for (int i = 1; i < mNodes.size(); i++) { mNodes.get(i).mAnimation.removeListener(mDummyListener); mNodes.get(i).mAnimation.removeListener(mAnimationEndingListener); } } Loading Loading @@ -1301,7 +1301,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim tmpListeners.get(i).onAnimationEnd(this, mReversing); } } removeDummyListener(); removeAnimationEndingListener(); mSelfPulse = true; mReversing = false; } Loading Loading @@ -1346,7 +1346,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim anim.mNodeMap = new ArrayMap<Animator, Node>(); anim.mNodes = new ArrayList<Node>(nodeCount); anim.mEvents = new ArrayList<AnimationEvent>(); anim.mDummyListener = new AnimatorListenerAdapter() { anim.mAnimationEndingListener = new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { if (anim.mNodeMap.get(animation) == null) { Loading @@ -1369,7 +1369,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim final Node node = mNodes.get(n); Node nodeClone = node.clone(); // Remove the old internal listener from the cloned child nodeClone.mAnimation.removeListener(mDummyListener); nodeClone.mAnimation.removeListener(mAnimationEndingListener); clonesMap.put(node, nodeClone); anim.mNodes.add(nodeClone); anim.mNodeMap.put(nodeClone.mAnimation, nodeClone); Loading Loading @@ -2087,7 +2087,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim * animation starts. */ public Builder after(long delay) { // setup dummy ValueAnimator just to run the clock // setup a ValueAnimator just to run the clock ValueAnimator anim = ValueAnimator.ofFloat(0f, 1f); anim.setDuration(delay); after(anim); Loading Loading
core/java/android/animation/AnimatorSet.java +10 −10 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim // This is to work around a bug in b/34736819. This needs to be removed once app team // fixes their side. private AnimatorListenerAdapter mDummyListener = new AnimatorListenerAdapter() { private AnimatorListenerAdapter mAnimationEndingListener = new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { if (mNodeMap.get(animation) == null) { Loading Loading @@ -1186,7 +1186,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim } private void startAnimation() { addDummyListener(); addAnimationEndingListener(); // Register animation callback addAnimationCallback(0); Loading Loading @@ -1243,15 +1243,15 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim // This is to work around the issue in b/34736819, as the old behavior in AnimatorSet had // masked a real bug in play movies. TODO: remove this and below once the root cause is fixed. private void addDummyListener() { private void addAnimationEndingListener() { for (int i = 1; i < mNodes.size(); i++) { mNodes.get(i).mAnimation.addListener(mDummyListener); mNodes.get(i).mAnimation.addListener(mAnimationEndingListener); } } private void removeDummyListener() { private void removeAnimationEndingListener() { for (int i = 1; i < mNodes.size(); i++) { mNodes.get(i).mAnimation.removeListener(mDummyListener); mNodes.get(i).mAnimation.removeListener(mAnimationEndingListener); } } Loading Loading @@ -1301,7 +1301,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim tmpListeners.get(i).onAnimationEnd(this, mReversing); } } removeDummyListener(); removeAnimationEndingListener(); mSelfPulse = true; mReversing = false; } Loading Loading @@ -1346,7 +1346,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim anim.mNodeMap = new ArrayMap<Animator, Node>(); anim.mNodes = new ArrayList<Node>(nodeCount); anim.mEvents = new ArrayList<AnimationEvent>(); anim.mDummyListener = new AnimatorListenerAdapter() { anim.mAnimationEndingListener = new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { if (anim.mNodeMap.get(animation) == null) { Loading @@ -1369,7 +1369,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim final Node node = mNodes.get(n); Node nodeClone = node.clone(); // Remove the old internal listener from the cloned child nodeClone.mAnimation.removeListener(mDummyListener); nodeClone.mAnimation.removeListener(mAnimationEndingListener); clonesMap.put(node, nodeClone); anim.mNodes.add(nodeClone); anim.mNodeMap.put(nodeClone.mAnimation, nodeClone); Loading Loading @@ -2087,7 +2087,7 @@ public final class AnimatorSet extends Animator implements AnimationHandler.Anim * animation starts. */ public Builder after(long delay) { // setup dummy ValueAnimator just to run the clock // setup a ValueAnimator just to run the clock ValueAnimator anim = ValueAnimator.ofFloat(0f, 1f); anim.setDuration(delay); after(anim); Loading