77import android .content .res .Resources ;
88import android .content .res .TypedArray ;
99import android .graphics .ColorFilter ;
10- import android .graphics .PorterDuff ;
1110import android .graphics .Rect ;
1211import android .graphics .Region ;
1312import android .graphics .drawable .Drawable ;
1413import androidx .core .graphics .drawable .DrawableCompat ;
15- import androidx .core .graphics .drawable .TintAwareDrawable ;
1614import android .util .AttributeSet ;
1715
1816/**
1917 * Internal common delegation shared by VectorDrawableCompat and AnimatedVectorDrawableCompat
2018 */
21- abstract class VectorDrawableCommon extends Drawable implements TintAwareDrawable {
19+ abstract class VectorDrawableCommon extends Drawable {
2220 /**
2321 * Obtains styled attributes from the theme, if available, or unstyled
2422 * resources if the theme is null.
@@ -37,12 +35,10 @@ protected static TypedArray obtainAttributes(
3735 Drawable mDelegateDrawable ;
3836
3937 @ Override
40- public void setColorFilter (int color , PorterDuff . Mode mode ) {
38+ public void setColorFilter (ColorFilter colorFilter ) {
4139 if (mDelegateDrawable != null ) {
42- mDelegateDrawable .setColorFilter (color , mode );
43- return ;
40+ mDelegateDrawable .setColorFilter (colorFilter );
4441 }
45- super .setColorFilter (color , mode );
4642 }
4743
4844 @ Override
@@ -76,30 +72,26 @@ public void setHotspot(float x, float y) {
7672 if (mDelegateDrawable != null ) {
7773 DrawableCompat .setHotspot (mDelegateDrawable , x , y );
7874 }
79- return ;
8075 }
8176
8277 @ Override
8378 public void setHotspotBounds (int left , int top , int right , int bottom ) {
8479 if (mDelegateDrawable != null ) {
8580 DrawableCompat .setHotspotBounds (mDelegateDrawable , left , top , right , bottom );
86- return ;
8781 }
8882 }
8983
9084 @ Override
9185 public void setFilterBitmap (boolean filter ) {
9286 if (mDelegateDrawable != null ) {
9387 mDelegateDrawable .setFilterBitmap (filter );
94- return ;
9588 }
9689 }
9790
9891 @ Override
9992 public void jumpToCurrentState () {
10093 if (mDelegateDrawable != null ) {
101- DrawableCompat .jumpToCurrentState (mDelegateDrawable );
102- return ;
94+ mDelegateDrawable .jumpToCurrentState ();
10395 }
10496 }
10597
@@ -108,7 +100,6 @@ public void applyTheme(Resources.Theme t) {
108100 // API >= 21 only.
109101 if (mDelegateDrawable != null ) {
110102 DrawableCompat .applyTheme (mDelegateDrawable , t );
111- return ;
112103 }
113104 }
114105
0 commit comments