Skip to content

Commit c01a17a

Browse files
committed
Removed deprecated apis
1 parent f78a581 commit c01a17a

2 files changed

Lines changed: 5 additions & 14 deletions

File tree

vectorchildfinder/src/main/java/com/devs/vectorchildfinder/VectorDrawableCommon.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,16 @@
77
import android.content.res.Resources;
88
import android.content.res.TypedArray;
99
import android.graphics.ColorFilter;
10-
import android.graphics.PorterDuff;
1110
import android.graphics.Rect;
1211
import android.graphics.Region;
1312
import android.graphics.drawable.Drawable;
1413
import androidx.core.graphics.drawable.DrawableCompat;
15-
import androidx.core.graphics.drawable.TintAwareDrawable;
1614
import 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

vectorchildfinder/src/main/java/com/devs/vectorchildfinder/VectorDrawableCompat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ public Drawable newDrawable() {
771771
@Override
772772
public Drawable newDrawable(Resources res) {
773773
VectorDrawableCompat drawableCompat = new VectorDrawableCompat();
774-
drawableCompat.mDelegateDrawable = (VectorDrawable) mDelegateState.newDrawable(res);
774+
drawableCompat.mDelegateDrawable = mDelegateState.newDrawable(res);
775775
return drawableCompat;
776776
}
777777

0 commit comments

Comments
 (0)