package X6FRs_4.IMuAHx_6.IFxWkV_5.XnFJ5_9;

import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.drawable.Drawable;
/* compiled from: WrappedDrawableApi14.java */
/* loaded from: classes.dex */
public class Mqv2r_3 extends Drawable implements Drawable.Callback, PGPF6hQ_2, QxJ9d_1 {
    public static final PorterDuff.Mode QxJ9d_1 = PorterDuff.Mode.SRC_IN;
    public int KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public IFxWkV_5 f410KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public PorterDuff.Mode f411KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public Drawable f412KQgRr5e_0;
    public boolean PGPF6hQ_2;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public boolean f413QxJ9d_1;

    public Mqv2r_3(IFxWkV_5 iFxWkV_5, Resources resources) {
        this.f410KQgRr5e_0 = iFxWkV_5;
        KQgRr5e_0(resources);
    }

    public final void KQgRr5e_0(Resources resources) {
        Drawable.ConstantState constantState;
        IFxWkV_5 iFxWkV_5 = this.f410KQgRr5e_0;
        if (iFxWkV_5 == null || (constantState = iFxWkV_5.f407KQgRr5e_0) == null) {
            return;
        }
        KQgRr5e_0(constantState.newDrawable(resources));
    }

    @Override // X6FRs_4.IMuAHx_6.IFxWkV_5.XnFJ5_9.PGPF6hQ_2
    public boolean KQgRr5e_0() {
        return true;
    }

    @Override // android.graphics.drawable.Drawable
    public void draw(Canvas canvas) {
        this.f412KQgRr5e_0.draw(canvas);
    }

    @Override // android.graphics.drawable.Drawable
    public int getChangingConfigurations() {
        int changingConfigurations = super.getChangingConfigurations();
        IFxWkV_5 iFxWkV_5 = this.f410KQgRr5e_0;
        return changingConfigurations | (iFxWkV_5 != null ? iFxWkV_5.getChangingConfigurations() : 0) | this.f412KQgRr5e_0.getChangingConfigurations();
    }

    @Override // android.graphics.drawable.Drawable
    public Drawable.ConstantState getConstantState() {
        IFxWkV_5 iFxWkV_5 = this.f410KQgRr5e_0;
        if (iFxWkV_5 == null || !iFxWkV_5.KQgRr5e_0()) {
            return null;
        }
        this.f410KQgRr5e_0.KQgRr5e_0 = getChangingConfigurations();
        return this.f410KQgRr5e_0;
    }

    @Override // android.graphics.drawable.Drawable
    public Drawable getCurrent() {
        return this.f412KQgRr5e_0.getCurrent();
    }

    @Override // android.graphics.drawable.Drawable
    public int getIntrinsicHeight() {
        return this.f412KQgRr5e_0.getIntrinsicHeight();
    }

    @Override // android.graphics.drawable.Drawable
    public int getIntrinsicWidth() {
        return this.f412KQgRr5e_0.getIntrinsicWidth();
    }

    @Override // android.graphics.drawable.Drawable
    public int getMinimumHeight() {
        return this.f412KQgRr5e_0.getMinimumHeight();
    }

    @Override // android.graphics.drawable.Drawable
    public int getMinimumWidth() {
        return this.f412KQgRr5e_0.getMinimumWidth();
    }

    @Override // android.graphics.drawable.Drawable
    public int getOpacity() {
        return this.f412KQgRr5e_0.getOpacity();
    }

    @Override // android.graphics.drawable.Drawable
    public boolean getPadding(Rect rect) {
        return this.f412KQgRr5e_0.getPadding(rect);
    }

    @Override // android.graphics.drawable.Drawable
    public int[] getState() {
        return this.f412KQgRr5e_0.getState();
    }

    @Override // android.graphics.drawable.Drawable
    public Region getTransparentRegion() {
        return this.f412KQgRr5e_0.getTransparentRegion();
    }

    @Override // android.graphics.drawable.Drawable.Callback
    public void invalidateDrawable(Drawable drawable) {
        invalidateSelf();
    }

    @Override // android.graphics.drawable.Drawable
    public boolean isAutoMirrored() {
        return this.f412KQgRr5e_0.isAutoMirrored();
    }

    @Override // android.graphics.drawable.Drawable
    public boolean isStateful() {
        IFxWkV_5 iFxWkV_5;
        ColorStateList colorStateList = (!KQgRr5e_0() || (iFxWkV_5 = this.f410KQgRr5e_0) == null) ? null : iFxWkV_5.f405KQgRr5e_0;
        return (colorStateList != null && colorStateList.isStateful()) || this.f412KQgRr5e_0.isStateful();
    }

    @Override // android.graphics.drawable.Drawable
    public void jumpToCurrentState() {
        this.f412KQgRr5e_0.jumpToCurrentState();
    }

    @Override // android.graphics.drawable.Drawable
    public Drawable mutate() {
        if (!this.PGPF6hQ_2 && super.mutate() == this) {
            this.f410KQgRr5e_0 = KQgRr5e_0();
            Drawable drawable = this.f412KQgRr5e_0;
            if (drawable != null) {
                drawable.mutate();
            }
            IFxWkV_5 iFxWkV_5 = this.f410KQgRr5e_0;
            if (iFxWkV_5 != null) {
                Drawable drawable2 = this.f412KQgRr5e_0;
                iFxWkV_5.f407KQgRr5e_0 = drawable2 != null ? drawable2.getConstantState() : null;
            }
            this.PGPF6hQ_2 = true;
        }
        return this;
    }

    @Override // android.graphics.drawable.Drawable
    public void onBoundsChange(Rect rect) {
        Drawable drawable = this.f412KQgRr5e_0;
        if (drawable != null) {
            drawable.setBounds(rect);
        }
    }

    @Override // android.graphics.drawable.Drawable
    public boolean onLevelChange(int i) {
        return this.f412KQgRr5e_0.setLevel(i);
    }

    @Override // android.graphics.drawable.Drawable.Callback
    public void scheduleDrawable(Drawable drawable, Runnable runnable, long j) {
        scheduleSelf(runnable, j);
    }

    @Override // android.graphics.drawable.Drawable
    public void setAlpha(int i) {
        this.f412KQgRr5e_0.setAlpha(i);
    }

    @Override // android.graphics.drawable.Drawable
    public void setAutoMirrored(boolean z) {
        this.f412KQgRr5e_0.setAutoMirrored(z);
    }

    @Override // android.graphics.drawable.Drawable
    public void setChangingConfigurations(int i) {
        this.f412KQgRr5e_0.setChangingConfigurations(i);
    }

    @Override // android.graphics.drawable.Drawable
    public void setColorFilter(ColorFilter colorFilter) {
        this.f412KQgRr5e_0.setColorFilter(colorFilter);
    }

    @Override // android.graphics.drawable.Drawable
    public void setDither(boolean z) {
        this.f412KQgRr5e_0.setDither(z);
    }

    @Override // android.graphics.drawable.Drawable
    public void setFilterBitmap(boolean z) {
        this.f412KQgRr5e_0.setFilterBitmap(z);
    }

    @Override // android.graphics.drawable.Drawable
    public boolean setState(int[] iArr) {
        return KQgRr5e_0(iArr) || this.f412KQgRr5e_0.setState(iArr);
    }

    @Override // android.graphics.drawable.Drawable, X6FRs_4.IMuAHx_6.IFxWkV_5.XnFJ5_9.QxJ9d_1
    public void setTint(int i) {
        setTintList(ColorStateList.valueOf(i));
    }

    @Override // android.graphics.drawable.Drawable, X6FRs_4.IMuAHx_6.IFxWkV_5.XnFJ5_9.QxJ9d_1
    public void setTintList(ColorStateList colorStateList) {
        this.f410KQgRr5e_0.f405KQgRr5e_0 = colorStateList;
        KQgRr5e_0(getState());
    }

    @Override // android.graphics.drawable.Drawable, X6FRs_4.IMuAHx_6.IFxWkV_5.XnFJ5_9.QxJ9d_1
    public void setTintMode(PorterDuff.Mode mode) {
        this.f410KQgRr5e_0.f406KQgRr5e_0 = mode;
        KQgRr5e_0(getState());
    }

    @Override // android.graphics.drawable.Drawable
    public boolean setVisible(boolean z, boolean z2) {
        return super.setVisible(z, z2) || this.f412KQgRr5e_0.setVisible(z, z2);
    }

    @Override // android.graphics.drawable.Drawable.Callback
    public void unscheduleDrawable(Drawable drawable, Runnable runnable) {
        unscheduleSelf(runnable);
    }

    @Override // X6FRs_4.IMuAHx_6.IFxWkV_5.XnFJ5_9.PGPF6hQ_2
    public final IFxWkV_5 KQgRr5e_0() {
        return new IFxWkV_5(this.f410KQgRr5e_0);
    }

    public Mqv2r_3(Drawable drawable) {
        this.f410KQgRr5e_0 = KQgRr5e_0();
        KQgRr5e_0(drawable);
    }

    public final boolean KQgRr5e_0(int[] iArr) {
        if (KQgRr5e_0()) {
            IFxWkV_5 iFxWkV_5 = this.f410KQgRr5e_0;
            ColorStateList colorStateList = iFxWkV_5.f405KQgRr5e_0;
            PorterDuff.Mode mode = iFxWkV_5.f406KQgRr5e_0;
            if (colorStateList != null && mode != null) {
                int colorForState = colorStateList.getColorForState(iArr, colorStateList.getDefaultColor());
                if (!this.f413QxJ9d_1 || colorForState != this.KQgRr5e_0 || mode != this.f411KQgRr5e_0) {
                    setColorFilter(colorForState, mode);
                    this.KQgRr5e_0 = colorForState;
                    this.f411KQgRr5e_0 = mode;
                    this.f413QxJ9d_1 = true;
                    return true;
                }
            } else {
                this.f413QxJ9d_1 = false;
                clearColorFilter();
            }
            return false;
        }
        return false;
    }

    @Override // X6FRs_4.IMuAHx_6.IFxWkV_5.XnFJ5_9.PGPF6hQ_2
    public final Drawable KQgRr5e_0() {
        return this.f412KQgRr5e_0;
    }

    @Override // X6FRs_4.IMuAHx_6.IFxWkV_5.XnFJ5_9.PGPF6hQ_2
    public final void KQgRr5e_0(Drawable drawable) {
        Drawable drawable2 = this.f412KQgRr5e_0;
        if (drawable2 != null) {
            drawable2.setCallback(null);
        }
        this.f412KQgRr5e_0 = drawable;
        if (drawable != null) {
            drawable.setCallback(this);
            setVisible(drawable.isVisible(), true);
            setState(drawable.getState());
            setLevel(drawable.getLevel());
            setBounds(drawable.getBounds());
            IFxWkV_5 iFxWkV_5 = this.f410KQgRr5e_0;
            if (iFxWkV_5 != null) {
                iFxWkV_5.f407KQgRr5e_0 = drawable.getConstantState();
            }
        }
        invalidateSelf();
    }
}
