Initial commit
This commit is contained in:
@@ -0,0 +1,145 @@
|
||||
package androidx.vectordrawable.graphics.drawable;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Region;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import androidx.core.graphics.drawable.TintAwareDrawable;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
abstract class VectorDrawableCommon extends Drawable implements TintAwareDrawable {
|
||||
Drawable a;
|
||||
|
||||
VectorDrawableCommon() {
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void applyTheme(Resources.Theme theme) {
|
||||
Drawable drawable = this.a;
|
||||
if (drawable != null) {
|
||||
DrawableCompat.a(drawable, theme);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void clearColorFilter() {
|
||||
Drawable drawable = this.a;
|
||||
if (drawable != null) {
|
||||
drawable.clearColorFilter();
|
||||
} else {
|
||||
super.clearColorFilter();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public ColorFilter getColorFilter() {
|
||||
Drawable drawable = this.a;
|
||||
if (drawable != null) {
|
||||
return DrawableCompat.d(drawable);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public Drawable getCurrent() {
|
||||
Drawable drawable = this.a;
|
||||
return drawable != null ? drawable.getCurrent() : super.getCurrent();
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public int getMinimumHeight() {
|
||||
Drawable drawable = this.a;
|
||||
return drawable != null ? drawable.getMinimumHeight() : super.getMinimumHeight();
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public int getMinimumWidth() {
|
||||
Drawable drawable = this.a;
|
||||
return drawable != null ? drawable.getMinimumWidth() : super.getMinimumWidth();
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public boolean getPadding(Rect rect) {
|
||||
Drawable drawable = this.a;
|
||||
return drawable != null ? drawable.getPadding(rect) : super.getPadding(rect);
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public int[] getState() {
|
||||
Drawable drawable = this.a;
|
||||
return drawable != null ? drawable.getState() : super.getState();
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public Region getTransparentRegion() {
|
||||
Drawable drawable = this.a;
|
||||
return drawable != null ? drawable.getTransparentRegion() : super.getTransparentRegion();
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void jumpToCurrentState() {
|
||||
Drawable drawable = this.a;
|
||||
if (drawable != null) {
|
||||
DrawableCompat.g(drawable);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
protected boolean onLevelChange(int i) {
|
||||
Drawable drawable = this.a;
|
||||
return drawable != null ? drawable.setLevel(i) : super.onLevelChange(i);
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void setChangingConfigurations(int i) {
|
||||
Drawable drawable = this.a;
|
||||
if (drawable != null) {
|
||||
drawable.setChangingConfigurations(i);
|
||||
} else {
|
||||
super.setChangingConfigurations(i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void setColorFilter(int i, PorterDuff.Mode mode) {
|
||||
Drawable drawable = this.a;
|
||||
if (drawable != null) {
|
||||
drawable.setColorFilter(i, mode);
|
||||
} else {
|
||||
super.setColorFilter(i, mode);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void setFilterBitmap(boolean z) {
|
||||
Drawable drawable = this.a;
|
||||
if (drawable != null) {
|
||||
drawable.setFilterBitmap(z);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void setHotspot(float f, float f2) {
|
||||
Drawable drawable = this.a;
|
||||
if (drawable != null) {
|
||||
DrawableCompat.a(drawable, f, f2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public void setHotspotBounds(int i, int i2, int i3, int i4) {
|
||||
Drawable drawable = this.a;
|
||||
if (drawable != null) {
|
||||
DrawableCompat.a(drawable, i, i2, i3, i4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // android.graphics.drawable.Drawable
|
||||
public boolean setState(int[] iArr) {
|
||||
Drawable drawable = this.a;
|
||||
return drawable != null ? drawable.setState(iArr) : super.setState(iArr);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user