diff options
author | ztenghui <ztenghui@google.com> | 2014-09-24 23:18:15 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-09-24 23:18:15 +0000 |
commit | 533b4d3e51c0571944933141fb44655bb482c6a0 (patch) | |
tree | 8493c84a7bb381c8f4b63f36cbcbfc8ca61bc298 /graphics | |
parent | bc167acc25de66dbdfca0bd71333260b5ea6f9f4 (diff) | |
parent | dde353394c43ad01820c27db403cb9dedd36da4e (diff) | |
download | frameworks_base-533b4d3e51c0571944933141fb44655bb482c6a0.zip frameworks_base-533b4d3e51c0571944933141fb44655bb482c6a0.tar.gz frameworks_base-533b4d3e51c0571944933141fb44655bb482c6a0.tar.bz2 |
am c793e67c: Merge "Fix AVD for CTS failure." into lmp-dev
* commit 'c793e67ca93a1550fa68c887ef00d207ac1e1d84':
Fix AVD for CTS failure.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java index 49e8b9d..df1b126 100644 --- a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java +++ b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java @@ -137,8 +137,7 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable { private boolean mMutated; public AnimatedVectorDrawable() { - mAnimatedVectorState = new AnimatedVectorDrawableState( - new AnimatedVectorDrawableState(null)); + mAnimatedVectorState = new AnimatedVectorDrawableState(null); } private AnimatedVectorDrawable(AnimatedVectorDrawableState state, Resources res, @@ -160,10 +159,16 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable { @Override public ConstantState getConstantState() { + mAnimatedVectorState.mChangingConfigurations = getChangingConfigurations(); return mAnimatedVectorState; } @Override + public int getChangingConfigurations() { + return super.getChangingConfigurations() | mAnimatedVectorState.mChangingConfigurations; + } + + @Override public void draw(Canvas canvas) { mAnimatedVectorState.mVectorDrawable.draw(canvas); if (isStarted()) { @@ -347,6 +352,8 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable { mTargetNameMap.put(animClone, targetName); } } + } else { + mVectorDrawable = new VectorDrawable(); } } |