summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorztenghui <ztenghui@google.com>2014-09-24 23:18:15 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-24 23:18:15 +0000
commit533b4d3e51c0571944933141fb44655bb482c6a0 (patch)
tree8493c84a7bb381c8f4b63f36cbcbfc8ca61bc298 /graphics
parentbc167acc25de66dbdfca0bd71333260b5ea6f9f4 (diff)
parentdde353394c43ad01820c27db403cb9dedd36da4e (diff)
downloadframeworks_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.java11
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();
}
}