package r; import android.content.res.ColorStateList; import android.content.res.Resources; import android.graphics.Outline; import android.graphics.PorterDuff; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.graphics.drawable.DrawableContainer; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.InsetDrawable; import android.graphics.drawable.RippleDrawable; import android.os.Build; import android.util.Log; import java.lang.reflect.Method; /* loaded from: classes.dex */ class t extends s { /* renamed from: h, reason: collision with root package name */ private static Method f13600h; t(Drawable drawable) { super(drawable); g(); } private void g() { if (f13600h == null) { try { f13600h = Drawable.class.getDeclaredMethod("isProjected", new Class[0]); } catch (Exception e10) { Log.w("WrappedDrawableApi21", "Failed to retrieve Drawable#isProjected() method", e10); } } } @Override // r.s protected boolean c() { if (Build.VERSION.SDK_INT != 21) { return false; } Drawable drawable = this.f13599f; return (drawable instanceof GradientDrawable) || (drawable instanceof DrawableContainer) || (drawable instanceof InsetDrawable) || (drawable instanceof RippleDrawable); } @Override // android.graphics.drawable.Drawable public Rect getDirtyBounds() { return this.f13599f.getDirtyBounds(); } @Override // android.graphics.drawable.Drawable public void getOutline(Outline outline) { this.f13599f.getOutline(outline); } @Override // android.graphics.drawable.Drawable public boolean isProjected() { Method method; Drawable drawable = this.f13599f; if (drawable != null && (method = f13600h) != null) { try { return ((Boolean) method.invoke(drawable, new Object[0])).booleanValue(); } catch (Exception e10) { Log.w("WrappedDrawableApi21", "Error calling Drawable#isProjected() method", e10); } } return false; } @Override // android.graphics.drawable.Drawable public void setHotspot(float f10, float f11) { this.f13599f.setHotspot(f10, f11); } @Override // android.graphics.drawable.Drawable public void setHotspotBounds(int i10, int i11, int i12, int i13) { this.f13599f.setHotspotBounds(i10, i11, i12, i13); } @Override // r.s, android.graphics.drawable.Drawable public boolean setState(int[] iArr) { if (!super.setState(iArr)) { return false; } invalidateSelf(); return true; } @Override // r.s, android.graphics.drawable.Drawable public void setTint(int i10) { if (c()) { super.setTint(i10); } else { this.f13599f.setTint(i10); } } @Override // r.s, android.graphics.drawable.Drawable public void setTintList(ColorStateList colorStateList) { if (c()) { super.setTintList(colorStateList); } else { this.f13599f.setTintList(colorStateList); } } @Override // r.s, android.graphics.drawable.Drawable public void setTintMode(PorterDuff.Mode mode) { if (c()) { super.setTintMode(mode); } else { this.f13599f.setTintMode(mode); } } t(u uVar, Resources resources) { super(uVar, resources); g(); } }