summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2014-12-04 16:41:01 -0800
committerztenghui <ztenghui@google.com>2014-12-04 16:55:26 -0800
commitd2f50c78c3c5205d6b28b7079d2f845c3d9dc0b3 (patch)
tree5eba4a9ebc79d1c5eb09cc90a9c532cae63fa567 /graphics
parent2705387df6f3ffe87b2a3a71a48eea7e2be44fb1 (diff)
downloadframeworks_base-d2f50c78c3c5205d6b28b7079d2f845c3d9dc0b3.zip
frameworks_base-d2f50c78c3c5205d6b28b7079d2f845c3d9dc0b3.tar.gz
frameworks_base-d2f50c78c3c5205d6b28b7079d2f845c3d9dc0b3.tar.bz2
AVD: Deep copy the animator target setup when mutate.
Only calling VectorDrawable's mutate here will miss all the animator setup, when the VectorDrawable has a new state. So we just deep copy everything and setup the animators again. b/18521582 Change-Id: Id164312750bb548f9c2d21cc0b5806cd2bafcf0d
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
index e9c8c2a..2a17a60 100644
--- a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
@@ -146,7 +146,8 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable {
@Override
public Drawable mutate() {
if (!mMutated && super.mutate() == this) {
- mAnimatedVectorState.mVectorDrawable.mutate();
+ mAnimatedVectorState = new AnimatedVectorDrawableState(
+ mAnimatedVectorState, mCallback, null);
mMutated = true;
}
return this;