package defpackage;

import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
import android.util.TypedValue;
import java.io.IOException;
import java.util.ArrayDeque;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

/* JADX INFO: renamed from: ˉᵥᵽ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1235 extends AbstractC4887 {

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public static final PorterDuff.Mode f5200 = PorterDuff.Mode.SRC_IN;

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final float[] f5201;

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public final Matrix f5202;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public PorterDuffColorFilter f5203;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public C0984 f5204;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public ColorFilter f5205;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public boolean f5206;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public boolean f5207;

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public final Rect f5208;

    public C1235() {
        this.f5207 = true;
        this.f5201 = new float[9];
        this.f5202 = new Matrix();
        this.f5208 = new Rect();
        C0984 c0984 = new C0984();
        c0984.f4287 = null;
        c0984.f4294 = f5200;
        c0984.f4285 = new C2802();
        this.f5204 = c0984;
    }

    public C1235(C0984 c0984) {
        this.f5207 = true;
        this.f5201 = new float[9];
        this.f5202 = new Matrix();
        this.f5208 = new Rect();
        this.f5204 = c0984;
        this.f5203 = m3717(c0984.f4287, c0984.f4294);
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean canApplyTheme() {
        Drawable drawable = this.f18606;
        if (drawable == null) {
            return false;
        }
        drawable.canApplyTheme();
        return false;
    }

    @Override // android.graphics.drawable.Drawable
    public final void draw(Canvas canvas) {
        Paint paint;
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.draw(canvas);
            return;
        }
        Rect rect = this.f5208;
        copyBounds(rect);
        if (rect.width() <= 0 || rect.height() <= 0) {
            return;
        }
        ColorFilter colorFilter = this.f5205;
        if (colorFilter == null) {
            colorFilter = this.f5203;
        }
        Matrix matrix = this.f5202;
        canvas.getMatrix(matrix);
        float[] fArr = this.f5201;
        matrix.getValues(fArr);
        float fAbs = Math.abs(fArr[0]);
        float fAbs2 = Math.abs(fArr[4]);
        float fAbs3 = Math.abs(fArr[1]);
        float fAbs4 = Math.abs(fArr[3]);
        if (fAbs3 != 0.0f || fAbs4 != 0.0f) {
            fAbs = 1.0f;
            fAbs2 = 1.0f;
        }
        int iWidth = (int) (rect.width() * fAbs);
        int iMin = Math.min(2048, iWidth);
        int iMin2 = Math.min(2048, (int) (rect.height() * fAbs2));
        if (iMin <= 0 || iMin2 <= 0) {
            return;
        }
        int iSave = canvas.save();
        canvas.translate(rect.left, rect.top);
        if (isAutoMirrored() && getLayoutDirection() == 1) {
            canvas.translate(rect.width(), 0.0f);
            canvas.scale(-1.0f, 1.0f);
        }
        rect.offsetTo(0, 0);
        C0984 c0984 = this.f5204;
        Bitmap bitmap = c0984.f4296;
        if (bitmap == null || iMin != bitmap.getWidth() || iMin2 != c0984.f4296.getHeight()) {
            c0984.f4296 = Bitmap.createBitmap(iMin, iMin2, Bitmap.Config.ARGB_8888);
            c0984.f4293 = true;
        }
        boolean z = this.f5207;
        C0984 c09842 = this.f5204;
        if (!z) {
            c09842.f4296.eraseColor(0);
            Canvas canvas2 = new Canvas(c09842.f4296);
            C2802 c2802 = c09842.f4285;
            c2802.m6782(c2802.f10763, C2802.f10752, canvas2, iMin, iMin2);
        } else if (c09842.f4293 || c09842.f4292 != c09842.f4287 || c09842.f4286 != c09842.f4294 || c09842.f4290 != c09842.f4288 || c09842.f4295 != c09842.f4285.getRootAlpha()) {
            C0984 c09843 = this.f5204;
            c09843.f4296.eraseColor(0);
            Canvas canvas3 = new Canvas(c09843.f4296);
            C2802 c28022 = c09843.f4285;
            c28022.m6782(c28022.f10763, C2802.f10752, canvas3, iMin, iMin2);
            C0984 c09844 = this.f5204;
            c09844.f4292 = c09844.f4287;
            c09844.f4286 = c09844.f4294;
            c09844.f4295 = c09844.f4285.getRootAlpha();
            c09844.f4290 = c09844.f4288;
            c09844.f4293 = false;
        }
        C0984 c09845 = this.f5204;
        if (c09845.f4285.getRootAlpha() >= 255 && colorFilter == null) {
            paint = null;
        } else {
            if (c09845.f4289 == null) {
                Paint paint2 = new Paint();
                c09845.f4289 = paint2;
                paint2.setFilterBitmap(true);
            }
            c09845.f4289.setAlpha(c09845.f4285.getRootAlpha());
            c09845.f4289.setColorFilter(colorFilter);
            paint = c09845.f4289;
        }
        canvas.drawBitmap(c09845.f4296, (Rect) null, rect, paint);
        canvas.restoreToCount(iSave);
    }

    @Override // android.graphics.drawable.Drawable
    public final int getAlpha() {
        Drawable drawable = this.f18606;
        return drawable != null ? drawable.getAlpha() : this.f5204.f4285.getRootAlpha();
    }

    @Override // android.graphics.drawable.Drawable
    public final int getChangingConfigurations() {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            return drawable.getChangingConfigurations();
        }
        return this.f5204.getChangingConfigurations() | super.getChangingConfigurations();
    }

    @Override // android.graphics.drawable.Drawable
    public final ColorFilter getColorFilter() {
        Drawable drawable = this.f18606;
        return drawable != null ? drawable.getColorFilter() : this.f5205;
    }

    @Override // android.graphics.drawable.Drawable
    public final Drawable.ConstantState getConstantState() {
        if (this.f18606 != null && Build.VERSION.SDK_INT >= 24) {
            return new C2182(this.f18606.getConstantState());
        }
        this.f5204.f4291 = getChangingConfigurations();
        return this.f5204;
    }

    @Override // android.graphics.drawable.Drawable
    public final int getIntrinsicHeight() {
        Drawable drawable = this.f18606;
        return drawable != null ? drawable.getIntrinsicHeight() : (int) this.f5204.f4285.f10766;
    }

    @Override // android.graphics.drawable.Drawable
    public final int getIntrinsicWidth() {
        Drawable drawable = this.f18606;
        return drawable != null ? drawable.getIntrinsicWidth() : (int) this.f5204.f4285.f10754;
    }

    @Override // android.graphics.drawable.Drawable
    public final int getOpacity() {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            return drawable.getOpacity();
        }
        return -3;
    }

    @Override // android.graphics.drawable.Drawable
    public final void inflate(Resources resources, XmlPullParser xmlPullParser, AttributeSet attributeSet) throws XmlPullParserException, IOException {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.inflate(resources, xmlPullParser, attributeSet);
        } else {
            inflate(resources, xmlPullParser, attributeSet, null);
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void inflate(Resources resources, XmlPullParser xmlPullParser, AttributeSet attributeSet, Resources.Theme theme) {
        int i;
        char c;
        int i2;
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.inflate(resources, xmlPullParser, attributeSet, theme);
            return;
        }
        C0984 c0984 = this.f5204;
        c0984.f4285 = new C2802();
        TypedArray typedArray = ᵫﾞˌ.ˉᵲ(resources, theme, attributeSet, ᵴᵧˈ.ᵲᵶᵳˈ);
        C0984 c09842 = this.f5204;
        C2802 c2802 = c09842.f4285;
        int i3 = !ᵫﾞˌ.ᵪᵹᵥᵻ(xmlPullParser, "tintMode") ? -1 : typedArray.getInt(6, -1);
        PorterDuff.Mode mode = PorterDuff.Mode.SRC_IN;
        if (i3 == 3) {
            mode = PorterDuff.Mode.SRC_OVER;
        } else if (i3 != 5) {
            if (i3 != 9) {
                switch (i3) {
                    case 14:
                        mode = PorterDuff.Mode.MULTIPLY;
                        break;
                    case 15:
                        mode = PorterDuff.Mode.SCREEN;
                        break;
                    case 16:
                        mode = PorterDuff.Mode.ADD;
                        break;
                }
            } else {
                mode = PorterDuff.Mode.SRC_ATOP;
            }
        }
        c09842.f4294 = mode;
        ColorStateList colorStateListM10402 = null;
        int i4 = 1;
        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "tint") != null) {
            TypedValue typedValue = new TypedValue();
            typedArray.getValue(1, typedValue);
            int i5 = typedValue.type;
            if (i5 == 2) {
                throw new UnsupportedOperationException("Failed to resolve attribute at index 1: " + typedValue);
            }
            if (i5 < 28 || i5 > 31) {
                Resources resources2 = typedArray.getResources();
                int resourceId = typedArray.getResourceId(1, 0);
                ThreadLocal threadLocal = AbstractC5074.f19131;
                try {
                    colorStateListM10402 = AbstractC5074.m10402(resources2, resources2.getXml(resourceId), theme);
                } catch (Exception unused) {
                }
            } else {
                colorStateListM10402 = ColorStateList.valueOf(typedValue.data);
            }
        }
        ColorStateList colorStateList = colorStateListM10402;
        if (colorStateList != null) {
            c09842.f4287 = colorStateList;
        }
        boolean z = c09842.f4288;
        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "autoMirrored") != null) {
            z = typedArray.getBoolean(5, z);
        }
        c09842.f4288 = z;
        float f = c2802.f10761;
        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "viewportWidth") != null) {
            f = typedArray.getFloat(7, f);
        }
        c2802.f10761 = f;
        float f2 = c2802.f10764;
        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "viewportHeight") != null) {
            f2 = typedArray.getFloat(8, f2);
        }
        c2802.f10764 = f2;
        if (c2802.f10761 <= 0.0f) {
            throw new XmlPullParserException(typedArray.getPositionDescription() + "<vector> tag requires viewportWidth > 0");
        }
        if (f2 <= 0.0f) {
            throw new XmlPullParserException(typedArray.getPositionDescription() + "<vector> tag requires viewportHeight > 0");
        }
        c2802.f10754 = typedArray.getDimension(3, c2802.f10754);
        float dimension = typedArray.getDimension(2, c2802.f10766);
        c2802.f10766 = dimension;
        if (c2802.f10754 <= 0.0f) {
            throw new XmlPullParserException(typedArray.getPositionDescription() + "<vector> tag requires width > 0");
        }
        if (dimension <= 0.0f) {
            throw new XmlPullParserException(typedArray.getPositionDescription() + "<vector> tag requires height > 0");
        }
        float alpha = c2802.getAlpha();
        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "alpha") != null) {
            alpha = typedArray.getFloat(4, alpha);
        }
        c2802.setAlpha(alpha);
        String string = typedArray.getString(0);
        if (string != null) {
            c2802.f10757 = string;
            c2802.f10759.put(string, c2802);
        }
        typedArray.recycle();
        c0984.f4291 = getChangingConfigurations();
        c0984.f4293 = true;
        C0984 c09843 = this.f5204;
        C2802 c28022 = c09843.f4285;
        ArrayDeque arrayDeque = new ArrayDeque();
        C3739 c3739 = c28022.f10763;
        C3310 c3310 = c28022.f10759;
        arrayDeque.push(c3739);
        int eventType = xmlPullParser.getEventType();
        int depth = xmlPullParser.getDepth() + 1;
        boolean z2 = true;
        while (eventType != i4 && (xmlPullParser.getDepth() >= depth || eventType != 3)) {
            if (eventType == 2) {
                String name = xmlPullParser.getName();
                C3739 c37392 = (C3739) arrayDeque.peek();
                i = depth;
                if ("path".equals(name)) {
                    C3861 c3861 = new C3861();
                    c3861.f14751 = 0.0f;
                    c3861.f14754 = 1.0f;
                    c3861.f14748 = 1.0f;
                    c3861.f14757 = 0.0f;
                    c3861.f14753 = 1.0f;
                    c3861.f14755 = 0.0f;
                    Paint.Cap cap = Paint.Cap.BUTT;
                    c3861.f14752 = cap;
                    Paint.Join join = Paint.Join.MITER;
                    c3861.f14750 = join;
                    c3861.f14749 = 4.0f;
                    TypedArray typedArray2 = ᵫﾞˌ.ˉᵲ(resources, theme, attributeSet, ᵴᵧˈ.ːˏᵟᵯ);
                    if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "pathData") != null) {
                        String string2 = typedArray2.getString(0);
                        if (string2 != null) {
                            c3861.f18408 = string2;
                        }
                        String string3 = typedArray2.getString(2);
                        if (string3 != null) {
                            c3861.f18410 = ᵝˉː.ᵱᵽʡᵚ(string3);
                        }
                        c3861.f14758 = ᵫﾞˌ.ᵮᵣᵗˈ(typedArray2, xmlPullParser, theme, "fillColor", 1);
                        float f3 = c3861.f14748;
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "fillAlpha") != null) {
                            f3 = typedArray2.getFloat(12, f3);
                        }
                        c3861.f14748 = f3;
                        int i6 = xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "strokeLineCap") != null ? typedArray2.getInt(8, -1) : -1;
                        c3861.f14752 = i6 != 0 ? i6 != 1 ? i6 != 2 ? c3861.f14752 : Paint.Cap.SQUARE : Paint.Cap.ROUND : cap;
                        int i7 = xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "strokeLineJoin") != null ? typedArray2.getInt(9, -1) : -1;
                        c3861.f14750 = i7 != 0 ? i7 != 1 ? i7 != 2 ? c3861.f14750 : Paint.Join.BEVEL : Paint.Join.ROUND : join;
                        float f4 = c3861.f14749;
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "strokeMiterLimit") != null) {
                            f4 = typedArray2.getFloat(10, f4);
                        }
                        c3861.f14749 = f4;
                        c3861.f14756 = ᵫﾞˌ.ᵮᵣᵗˈ(typedArray2, xmlPullParser, theme, "strokeColor", 3);
                        float f5 = c3861.f14754;
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "strokeAlpha") != null) {
                            f5 = typedArray2.getFloat(11, f5);
                        }
                        c3861.f14754 = f5;
                        float f6 = c3861.f14751;
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "strokeWidth") != null) {
                            f6 = typedArray2.getFloat(4, f6);
                        }
                        c3861.f14751 = f6;
                        float f7 = c3861.f14753;
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "trimPathEnd") != null) {
                            f7 = typedArray2.getFloat(6, f7);
                        }
                        c3861.f14753 = f7;
                        float f8 = c3861.f14755;
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "trimPathOffset") != null) {
                            f8 = typedArray2.getFloat(7, f8);
                        }
                        c3861.f14755 = f8;
                        float f9 = c3861.f14757;
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "trimPathStart") != null) {
                            f9 = typedArray2.getFloat(5, f9);
                        }
                        c3861.f14757 = f9;
                        int i8 = c3861.f18409;
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "fillType") != null) {
                            i8 = typedArray2.getInt(13, i8);
                        }
                        c3861.f18409 = i8;
                    }
                    typedArray2.recycle();
                    c37392.f14186.add(c3861);
                    if (c3861.getPathName() != null) {
                        c3310.put(c3861.getPathName(), c3861);
                    }
                    c09843.f4291 = c09843.f4291;
                    z2 = false;
                    c = '\b';
                } else {
                    c = '\b';
                    if ("clip-path".equals(name)) {
                        C0039 c0039 = new C0039();
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "pathData") != null) {
                            TypedArray typedArray3 = ᵫﾞˌ.ˉᵲ(resources, theme, attributeSet, ᵴᵧˈ.ᵷᵺʾᵖ);
                            String string4 = typedArray3.getString(0);
                            if (string4 != null) {
                                c0039.f18408 = string4;
                            }
                            String string5 = typedArray3.getString(1);
                            if (string5 != null) {
                                c0039.f18410 = ᵝˉː.ᵱᵽʡᵚ(string5);
                            }
                            c0039.f18409 = !ᵫﾞˌ.ᵪᵹᵥᵻ(xmlPullParser, "fillType") ? 0 : typedArray3.getInt(2, 0);
                            typedArray3.recycle();
                        }
                        c37392.f14186.add(c0039);
                        if (c0039.getPathName() != null) {
                            c3310.put(c0039.getPathName(), c0039);
                        }
                        c09843.f4291 = c09843.f4291;
                    } else if ("group".equals(name)) {
                        C3739 c37393 = new C3739();
                        TypedArray typedArray4 = ᵫﾞˌ.ˉᵲ(resources, theme, attributeSet, ᵴᵧˈ.ʽˈˋ);
                        float f10 = c37393.f14188;
                        if (ᵫﾞˌ.ᵪᵹᵥᵻ(xmlPullParser, "rotation")) {
                            f10 = typedArray4.getFloat(5, f10);
                        }
                        c37393.f14188 = f10;
                        c37393.f14194 = typedArray4.getFloat(1, c37393.f14194);
                        c37393.f14189 = typedArray4.getFloat(2, c37393.f14189);
                        float f11 = c37393.f14196;
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "scaleX") != null) {
                            f11 = typedArray4.getFloat(3, f11);
                        }
                        c37393.f14196 = f11;
                        float f12 = c37393.f14192;
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "scaleY") != null) {
                            f12 = typedArray4.getFloat(4, f12);
                        }
                        c37393.f14192 = f12;
                        float f13 = c37393.f14187;
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "translateX") != null) {
                            f13 = typedArray4.getFloat(6, f13);
                        }
                        c37393.f14187 = f13;
                        float f14 = c37393.f14195;
                        if (xmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", "translateY") != null) {
                            f14 = typedArray4.getFloat(7, f14);
                        }
                        c37393.f14195 = f14;
                        String string6 = typedArray4.getString(0);
                        if (string6 != null) {
                            c37393.f14193 = string6;
                        }
                        c37393.m8406();
                        typedArray4.recycle();
                        c37392.f14186.add(c37393);
                        arrayDeque.push(c37393);
                        if (c37393.getGroupName() != null) {
                            c3310.put(c37393.getGroupName(), c37393);
                        }
                        c09843.f4291 = c09843.f4291;
                    }
                }
                i2 = 1;
            } else {
                i = depth;
                c = '\b';
                i2 = 1;
                if (eventType == 3 && "group".equals(xmlPullParser.getName())) {
                    arrayDeque.pop();
                }
            }
            eventType = xmlPullParser.next();
            i4 = i2;
            depth = i;
        }
        if (z2) {
            throw new XmlPullParserException("no path defined");
        }
        this.f5203 = m3717(c0984.f4287, c0984.f4294);
    }

    @Override // android.graphics.drawable.Drawable
    public final void invalidateSelf() {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.invalidateSelf();
        } else {
            super.invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean isAutoMirrored() {
        Drawable drawable = this.f18606;
        return drawable != null ? drawable.isAutoMirrored() : this.f5204.f4288;
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean isStateful() {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            return drawable.isStateful();
        }
        if (super.isStateful()) {
            return true;
        }
        C0984 c0984 = this.f5204;
        if (c0984 == null) {
            return false;
        }
        C2802 c2802 = c0984.f4285;
        if (c2802.f10755 == null) {
            c2802.f10755 = Boolean.valueOf(c2802.f10763.mo4328());
        }
        if (c2802.f10755.booleanValue()) {
            return true;
        }
        ColorStateList colorStateList = this.f5204.f4287;
        return colorStateList != null && colorStateList.isStateful();
    }

    @Override // android.graphics.drawable.Drawable
    public final Drawable mutate() {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.mutate();
            return this;
        }
        if (!this.f5206 && super.mutate() == this) {
            C0984 c0984 = this.f5204;
            C0984 c09842 = new C0984();
            c09842.f4287 = null;
            c09842.f4294 = f5200;
            if (c0984 != null) {
                c09842.f4291 = c0984.f4291;
                C2802 c2802 = new C2802(c0984.f4285);
                c09842.f4285 = c2802;
                if (c0984.f4285.f10758 != null) {
                    c2802.f10758 = new Paint(c0984.f4285.f10758);
                }
                if (c0984.f4285.f10765 != null) {
                    c09842.f4285.f10765 = new Paint(c0984.f4285.f10765);
                }
                c09842.f4287 = c0984.f4287;
                c09842.f4294 = c0984.f4294;
                c09842.f4288 = c0984.f4288;
            }
            this.f5204 = c09842;
            this.f5206 = true;
        }
        return this;
    }

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

    @Override // android.graphics.drawable.Drawable
    public final boolean onStateChange(int[] iArr) {
        boolean z;
        PorterDuff.Mode mode;
        Drawable drawable = this.f18606;
        if (drawable != null) {
            return drawable.setState(iArr);
        }
        C0984 c0984 = this.f5204;
        ColorStateList colorStateList = c0984.f4287;
        if (colorStateList == null || (mode = c0984.f4294) == null) {
            z = false;
        } else {
            this.f5203 = m3717(colorStateList, mode);
            invalidateSelf();
            z = true;
        }
        C2802 c2802 = c0984.f4285;
        if (c2802.f10755 == null) {
            c2802.f10755 = Boolean.valueOf(c2802.f10763.mo4328());
        }
        if (c2802.f10755.booleanValue()) {
            boolean zMo4327 = c0984.f4285.f10763.mo4327(iArr);
            c0984.f4293 |= zMo4327;
            if (zMo4327) {
                invalidateSelf();
                return true;
            }
        }
        return z;
    }

    @Override // android.graphics.drawable.Drawable
    public final void scheduleSelf(Runnable runnable, long j) {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.scheduleSelf(runnable, j);
        } else {
            super.scheduleSelf(runnable, j);
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setAlpha(int i) {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.setAlpha(i);
        } else if (this.f5204.f4285.getRootAlpha() != i) {
            this.f5204.f4285.setRootAlpha(i);
            invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setAutoMirrored(boolean z) {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.setAutoMirrored(z);
        } else {
            this.f5204.f4288 = z;
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setColorFilter(ColorFilter colorFilter) {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.setColorFilter(colorFilter);
        } else {
            this.f5205 = colorFilter;
            invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setTint(int i) {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.setTint(i);
        } else {
            setTintList(ColorStateList.valueOf(i));
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setTintList(ColorStateList colorStateList) {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.setTintList(colorStateList);
            return;
        }
        C0984 c0984 = this.f5204;
        if (c0984.f4287 != colorStateList) {
            c0984.f4287 = colorStateList;
            this.f5203 = m3717(colorStateList, c0984.f4294);
            invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final void setTintMode(PorterDuff.Mode mode) {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.setTintMode(mode);
            return;
        }
        C0984 c0984 = this.f5204;
        if (c0984.f4294 != mode) {
            c0984.f4294 = mode;
            this.f5203 = m3717(c0984.f4287, mode);
            invalidateSelf();
        }
    }

    @Override // android.graphics.drawable.Drawable
    public final boolean setVisible(boolean z, boolean z2) {
        Drawable drawable = this.f18606;
        return drawable != null ? drawable.setVisible(z, z2) : super.setVisible(z, z2);
    }

    @Override // android.graphics.drawable.Drawable
    public final void unscheduleSelf(Runnable runnable) {
        Drawable drawable = this.f18606;
        if (drawable != null) {
            drawable.unscheduleSelf(runnable);
        } else {
            super.unscheduleSelf(runnable);
        }
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final PorterDuffColorFilter m3717(ColorStateList colorStateList, PorterDuff.Mode mode) {
        if (colorStateList == null || mode == null) {
            return null;
        }
        return new PorterDuffColorFilter(colorStateList.getColorForState(getState(), 0), mode);
    }
}
