From 1af03b1d5319921c9f898103353f2646975ab0af Mon Sep 17 00:00:00 2001 From: Teng-Hui Zhu Date: Wed, 9 Mar 2016 14:22:04 -0800 Subject: Add the missing overriden API This is exposed by the CTS test. Change-Id: Ic25fda1567d8c8504612d4e825dbb646f7db1076 --- .../android/graphics/drawable/AnimatedVectorDrawable.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java index d325bd0bbb11..ab0b7a595aa7 100644 --- a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java +++ b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java @@ -259,6 +259,13 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable2 { return mAnimatedVectorState.mVectorDrawable.setLayoutDirection(layoutDirection); } + /** + * AnimatedVectorDrawable is running on render thread now. Therefore, if the root alpha is being + * animated, then the root alpha value we get from this call could be out of sync with alpha + * value used in the render thread. Otherwise, the root alpha should be always the same value. + * + * @return the containing vector drawable's root alpha value. + */ @Override public int getAlpha() { return mAnimatedVectorState.mVectorDrawable.getAlpha(); @@ -274,6 +281,11 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable2 { mAnimatedVectorState.mVectorDrawable.setColorFilter(colorFilter); } + @Override + public ColorFilter getColorFilter() { + return mAnimatedVectorState.mVectorDrawable.getColorFilter(); + } + @Override public void setTintList(ColorStateList tint) { mAnimatedVectorState.mVectorDrawable.setTintList(tint); -- cgit v1.2.3-59-g8ed1b