package p037.p041.p051;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.PorterDuff;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.LocaleList;
import android.text.method.PasswordTransformationMethod;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.widget.TextView;
import java.lang.ref.WeakReference;
import java.util.Arrays;
import java.util.Locale;
import p037.p041.C1477;
import p037.p041.p042.LayoutInflaterFactory2C1494;
import p037.p065.p068.p069.AbstractC1858;
import p037.p065.p078.C1920;
import p037.p065.p080.InterfaceC1963;
import p037.p065.p080.InterfaceC1967;
import p138.p139.p143.p144.C2803;

/* JADX INFO: renamed from: މ.ؠ.ގ.ޕ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C1640 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final TextView f5311;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public C1687 f5312;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public C1687 f5313;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public C1687 f5314;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public C1687 f5315;

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public C1687 f5316;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public C1687 f5317;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public C1687 f5318;

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public final C1643 f5319;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public int f5320 = 0;

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public int f5321 = -1;

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public Typeface f5322;

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public boolean f5323;

    /* JADX INFO: renamed from: މ.ؠ.ގ.ޕ$֏, reason: contains not printable characters */
    public class C1641 extends AbstractC1858 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final /* synthetic */ int f5324;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final /* synthetic */ int f5325;

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public final /* synthetic */ WeakReference f5326;

        public C1641(int i, int i2, WeakReference weakReference) {
            this.f5324 = i;
            this.f5325 = i2;
            this.f5326 = weakReference;
        }

        @Override // p037.p065.p068.p069.AbstractC1858
        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public void mo3205(Typeface typeface) {
            int i;
            if (Build.VERSION.SDK_INT >= 28 && (i = this.f5324) != -1) {
                typeface = Typeface.create(typeface, i, (this.f5325 & 2) != 0);
            }
            C1640 c1640 = C1640.this;
            WeakReference weakReference = this.f5326;
            if (c1640.f5323) {
                c1640.f5322 = typeface;
                TextView textView = (TextView) weakReference.get();
                if (textView != null) {
                    textView.setTypeface(typeface, c1640.f5320);
                }
            }
        }
    }

    public C1640(TextView textView) {
        this.f5311 = textView;
        this.f5319 = new C1643(this.f5311);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static C1687 m3193(Context context, C1615 c1615, int i) {
        ColorStateList colorStateListM3162 = c1615.m3162(context, i);
        if (colorStateListM3162 == null) {
            return null;
        }
        C1687 c1687 = new C1687();
        c1687.f5494 = true;
        c1687.f5491 = colorStateListM3162;
        return c1687;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m3194() {
        if (this.f5312 != null || this.f5313 != null || this.f5314 != null || this.f5315 != null) {
            Drawable[] compoundDrawables = this.f5311.getCompoundDrawables();
            m3201(compoundDrawables[0], this.f5312);
            m3201(compoundDrawables[1], this.f5313);
            m3201(compoundDrawables[2], this.f5314);
            m3201(compoundDrawables[3], this.f5315);
        }
        if (this.f5316 == null && this.f5317 == null) {
            return;
        }
        Drawable[] compoundDrawablesRelative = this.f5311.getCompoundDrawablesRelative();
        m3201(compoundDrawablesRelative[0], this.f5316);
        m3201(compoundDrawablesRelative[2], this.f5317);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m3195(int i) {
        C1643 c1643 = this.f5319;
        if (c1643.m3215()) {
            if (i == 0) {
                c1643.f5335 = 0;
                c1643.f5338 = -1.0f;
                c1643.f5339 = -1.0f;
                c1643.f5337 = -1.0f;
                c1643.f5340 = new int[0];
                c1643.f5336 = false;
                return;
            }
            if (i != 1) {
                throw new IllegalArgumentException(C2803.m4871("Unknown auto-size text type: ", i));
            }
            DisplayMetrics displayMetrics = c1643.f5344.getResources().getDisplayMetrics();
            c1643.m3210(TypedValue.applyDimension(2, 12.0f, displayMetrics), TypedValue.applyDimension(2, 112.0f, displayMetrics), 1.0f);
            if (c1643.m3213()) {
                c1643.m3209();
            }
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m3196(int i, int i2, int i3, int i4) {
        C1643 c1643 = this.f5319;
        if (c1643.m3215()) {
            DisplayMetrics displayMetrics = c1643.f5344.getResources().getDisplayMetrics();
            c1643.m3210(TypedValue.applyDimension(i4, i, displayMetrics), TypedValue.applyDimension(i4, i2, displayMetrics), TypedValue.applyDimension(i4, i3, displayMetrics));
            if (c1643.m3213()) {
                c1643.m3209();
            }
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m3197(Context context, int i) {
        String strM3304;
        ColorStateList colorStateListM3296;
        ColorStateList colorStateListM32962;
        ColorStateList colorStateListM32963;
        C1689 c1689 = new C1689(context, context.obtainStyledAttributes(i, C1477.TextAppearance));
        if (c1689.m3307(C1477.TextAppearance_textAllCaps)) {
            this.f5311.setAllCaps(c1689.m3298(C1477.TextAppearance_textAllCaps, false));
        }
        if (Build.VERSION.SDK_INT < 23) {
            if (c1689.m3307(C1477.TextAppearance_android_textColor) && (colorStateListM32963 = c1689.m3296(C1477.TextAppearance_android_textColor)) != null) {
                this.f5311.setTextColor(colorStateListM32963);
            }
            if (c1689.m3307(C1477.TextAppearance_android_textColorLink) && (colorStateListM32962 = c1689.m3296(C1477.TextAppearance_android_textColorLink)) != null) {
                this.f5311.setLinkTextColor(colorStateListM32962);
            }
            if (c1689.m3307(C1477.TextAppearance_android_textColorHint) && (colorStateListM3296 = c1689.m3296(C1477.TextAppearance_android_textColorHint)) != null) {
                this.f5311.setHintTextColor(colorStateListM3296);
            }
        }
        if (c1689.m3307(C1477.TextAppearance_android_textSize) && c1689.m3299(C1477.TextAppearance_android_textSize, -1) == 0) {
            this.f5311.setTextSize(0, 0.0f);
        }
        m3198(context, c1689);
        if (Build.VERSION.SDK_INT >= 26 && c1689.m3307(C1477.TextAppearance_fontVariationSettings) && (strM3304 = c1689.m3304(C1477.TextAppearance_fontVariationSettings)) != null) {
            this.f5311.setFontVariationSettings(strM3304);
        }
        c1689.f5496.recycle();
        Typeface typeface = this.f5322;
        if (typeface != null) {
            this.f5311.setTypeface(typeface, this.f5320);
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m3198(Context context, C1689 c1689) {
        String strM3304;
        this.f5320 = c1689.m3301(C1477.TextAppearance_android_textStyle, this.f5320);
        if (Build.VERSION.SDK_INT >= 28) {
            int iM3301 = c1689.m3301(C1477.TextAppearance_android_textFontWeight, -1);
            this.f5321 = iM3301;
            if (iM3301 != -1) {
                this.f5320 = (this.f5320 & 2) | 0;
            }
        }
        if (!c1689.m3307(C1477.TextAppearance_android_fontFamily) && !c1689.m3307(C1477.TextAppearance_fontFamily)) {
            if (c1689.m3307(C1477.TextAppearance_android_typeface)) {
                this.f5323 = false;
                int iM33012 = c1689.m3301(C1477.TextAppearance_android_typeface, 1);
                if (iM33012 == 1) {
                    this.f5322 = Typeface.SANS_SERIF;
                    return;
                } else if (iM33012 == 2) {
                    this.f5322 = Typeface.SERIF;
                    return;
                } else {
                    if (iM33012 != 3) {
                        return;
                    }
                    this.f5322 = Typeface.MONOSPACE;
                    return;
                }
            }
            return;
        }
        this.f5322 = null;
        int i = c1689.m3307(C1477.TextAppearance_fontFamily) ? C1477.TextAppearance_fontFamily : C1477.TextAppearance_android_fontFamily;
        int i2 = this.f5321;
        int i3 = this.f5320;
        if (!context.isRestricted()) {
            try {
                Typeface typefaceM3297 = c1689.m3297(i, this.f5320, new C1641(i2, i3, new WeakReference(this.f5311)));
                if (typefaceM3297 != null) {
                    if (Build.VERSION.SDK_INT < 28 || this.f5321 == -1) {
                        this.f5322 = typefaceM3297;
                    } else {
                        this.f5322 = Typeface.create(Typeface.create(typefaceM3297, 0), this.f5321, (this.f5320 & 2) != 0);
                    }
                }
                this.f5323 = this.f5322 == null;
            } catch (Resources.NotFoundException | UnsupportedOperationException unused) {
            }
        }
        if (this.f5322 != null || (strM3304 = c1689.m3304(i)) == null) {
            return;
        }
        if (Build.VERSION.SDK_INT < 28 || this.f5321 == -1) {
            this.f5322 = Typeface.create(strM3304, this.f5320);
        } else {
            this.f5322 = Typeface.create(Typeface.create(strM3304, 0), this.f5321, (this.f5320 & 2) != 0);
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m3199(ColorStateList colorStateList) {
        if (this.f5318 == null) {
            this.f5318 = new C1687();
        }
        C1687 c1687 = this.f5318;
        c1687.f5491 = colorStateList;
        c1687.f5494 = colorStateList != null;
        C1687 c16872 = this.f5318;
        this.f5312 = c16872;
        this.f5313 = c16872;
        this.f5314 = c16872;
        this.f5315 = c16872;
        this.f5316 = c16872;
        this.f5317 = c16872;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m3200(PorterDuff.Mode mode) {
        if (this.f5318 == null) {
            this.f5318 = new C1687();
        }
        C1687 c1687 = this.f5318;
        c1687.f5492 = mode;
        c1687.f5493 = mode != null;
        C1687 c16872 = this.f5318;
        this.f5312 = c16872;
        this.f5313 = c16872;
        this.f5314 = c16872;
        this.f5315 = c16872;
        this.f5316 = c16872;
        this.f5317 = c16872;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m3201(Drawable drawable, C1687 c1687) {
        if (drawable == null || c1687 == null) {
            return;
        }
        C1615.m3157(drawable, c1687, this.f5311.getDrawableState());
    }

    /* JADX WARN: Multi-variable type inference failed */
    @SuppressLint({"NewApi"})
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m3202(AttributeSet attributeSet, int i) {
        boolean zM3298;
        String strM3304;
        boolean z;
        ColorStateList colorStateListM3296;
        ColorStateList colorStateListM32962;
        String strM33042;
        ColorStateList colorStateListM32963;
        C1615 c1615;
        int i2;
        C1615 c16152;
        Drawable drawableM3159;
        int resourceId;
        Context context = this.f5311.getContext();
        C1615 c1615M3156 = C1615.m3156();
        C1689 c1689M3294 = C1689.m3294(context, attributeSet, C1477.AppCompatTextHelper, i, 0);
        TextView textView = this.f5311;
        C1920.m3742(textView, textView.getContext(), C1477.AppCompatTextHelper, attributeSet, c1689M3294.f5496, i, 0);
        int iM3305 = c1689M3294.m3305(C1477.AppCompatTextHelper_android_textAppearance, -1);
        if (c1689M3294.m3307(C1477.AppCompatTextHelper_android_drawableLeft)) {
            this.f5312 = m3193(context, c1615M3156, c1689M3294.m3305(C1477.AppCompatTextHelper_android_drawableLeft, 0));
        }
        if (c1689M3294.m3307(C1477.AppCompatTextHelper_android_drawableTop)) {
            this.f5313 = m3193(context, c1615M3156, c1689M3294.m3305(C1477.AppCompatTextHelper_android_drawableTop, 0));
        }
        if (c1689M3294.m3307(C1477.AppCompatTextHelper_android_drawableRight)) {
            this.f5314 = m3193(context, c1615M3156, c1689M3294.m3305(C1477.AppCompatTextHelper_android_drawableRight, 0));
        }
        if (c1689M3294.m3307(C1477.AppCompatTextHelper_android_drawableBottom)) {
            this.f5315 = m3193(context, c1615M3156, c1689M3294.m3305(C1477.AppCompatTextHelper_android_drawableBottom, 0));
        }
        if (c1689M3294.m3307(C1477.AppCompatTextHelper_android_drawableStart)) {
            this.f5316 = m3193(context, c1615M3156, c1689M3294.m3305(C1477.AppCompatTextHelper_android_drawableStart, 0));
        }
        if (c1689M3294.m3307(C1477.AppCompatTextHelper_android_drawableEnd)) {
            this.f5317 = m3193(context, c1615M3156, c1689M3294.m3305(C1477.AppCompatTextHelper_android_drawableEnd, 0));
        }
        c1689M3294.f5496.recycle();
        boolean z2 = this.f5311.getTransformationMethod() instanceof PasswordTransformationMethod;
        if (iM3305 != -1) {
            C1689 c1689 = new C1689(context, context.obtainStyledAttributes(iM3305, C1477.TextAppearance));
            if (z2 || !c1689.m3307(C1477.TextAppearance_textAllCaps)) {
                zM3298 = false;
                z = false;
            } else {
                zM3298 = c1689.m3298(C1477.TextAppearance_textAllCaps, false);
                z = true;
            }
            m3198(context, c1689);
            if (Build.VERSION.SDK_INT < 23) {
                colorStateListM3296 = c1689.m3307(C1477.TextAppearance_android_textColor) ? c1689.m3296(C1477.TextAppearance_android_textColor) : null;
                colorStateListM32963 = c1689.m3307(C1477.TextAppearance_android_textColorHint) ? c1689.m3296(C1477.TextAppearance_android_textColorHint) : null;
                colorStateListM32962 = c1689.m3307(C1477.TextAppearance_android_textColorLink) ? c1689.m3296(C1477.TextAppearance_android_textColorLink) : null;
            } else {
                colorStateListM3296 = null;
                colorStateListM32962 = null;
                colorStateListM32963 = null;
            }
            strM33042 = c1689.m3307(C1477.TextAppearance_textLocale) ? c1689.m3304(C1477.TextAppearance_textLocale) : null;
            strM3304 = (Build.VERSION.SDK_INT < 26 || !c1689.m3307(C1477.TextAppearance_fontVariationSettings)) ? null : c1689.m3304(C1477.TextAppearance_fontVariationSettings);
            c1689.f5496.recycle();
        } else {
            zM3298 = false;
            strM3304 = null;
            z = false;
            colorStateListM3296 = null;
            colorStateListM32962 = null;
            strM33042 = null;
            colorStateListM32963 = null;
        }
        C1689 c16892 = new C1689(context, context.obtainStyledAttributes(attributeSet, C1477.TextAppearance, i, 0));
        if (!z2 && c16892.m3307(C1477.TextAppearance_textAllCaps)) {
            zM3298 = c16892.m3298(C1477.TextAppearance_textAllCaps, false);
            z = true;
        }
        if (Build.VERSION.SDK_INT < 23) {
            if (c16892.m3307(C1477.TextAppearance_android_textColor)) {
                colorStateListM3296 = c16892.m3296(C1477.TextAppearance_android_textColor);
            }
            if (c16892.m3307(C1477.TextAppearance_android_textColorHint)) {
                colorStateListM32963 = c16892.m3296(C1477.TextAppearance_android_textColorHint);
            }
            if (c16892.m3307(C1477.TextAppearance_android_textColorLink)) {
                colorStateListM32962 = c16892.m3296(C1477.TextAppearance_android_textColorLink);
            }
        }
        if (c16892.m3307(C1477.TextAppearance_textLocale)) {
            strM33042 = c16892.m3304(C1477.TextAppearance_textLocale);
        }
        if (Build.VERSION.SDK_INT >= 26 && c16892.m3307(C1477.TextAppearance_fontVariationSettings)) {
            strM3304 = c16892.m3304(C1477.TextAppearance_fontVariationSettings);
        }
        if (Build.VERSION.SDK_INT >= 28 && c16892.m3307(C1477.TextAppearance_android_textSize) && c16892.m3299(C1477.TextAppearance_android_textSize, -1) == 0) {
            c1615 = c1615M3156;
            this.f5311.setTextSize(0, 0.0f);
        } else {
            c1615 = c1615M3156;
        }
        m3198(context, c16892);
        c16892.f5496.recycle();
        if (colorStateListM3296 != null) {
            this.f5311.setTextColor(colorStateListM3296);
        }
        if (colorStateListM32963 != null) {
            this.f5311.setHintTextColor(colorStateListM32963);
        }
        if (colorStateListM32962 != null) {
            this.f5311.setLinkTextColor(colorStateListM32962);
        }
        if (!z2 && z) {
            this.f5311.setAllCaps(zM3298);
        }
        Typeface typeface = this.f5322;
        if (typeface != null) {
            if (this.f5321 == -1) {
                this.f5311.setTypeface(typeface, this.f5320);
            } else {
                this.f5311.setTypeface(typeface);
            }
        }
        if (strM3304 != null) {
            this.f5311.setFontVariationSettings(strM3304);
        }
        if (strM33042 == null) {
            i2 = 0;
        } else if (Build.VERSION.SDK_INT >= 24) {
            this.f5311.setTextLocales(LocaleList.forLanguageTags(strM33042));
            i2 = 0;
        } else {
            i2 = 0;
            this.f5311.setTextLocale(Locale.forLanguageTag(strM33042.substring(0, strM33042.indexOf(44))));
        }
        C1643 c1643 = this.f5319;
        TypedArray typedArrayObtainStyledAttributes = c1643.f5344.obtainStyledAttributes(attributeSet, C1477.AppCompatTextView, i, i2);
        TextView textView2 = c1643.f5343;
        C1920.m3742(textView2, textView2.getContext(), C1477.AppCompatTextView, attributeSet, typedArrayObtainStyledAttributes, i, 0);
        if (typedArrayObtainStyledAttributes.hasValue(C1477.AppCompatTextView_autoSizeTextType)) {
            c1643.f5335 = typedArrayObtainStyledAttributes.getInt(C1477.AppCompatTextView_autoSizeTextType, 0);
        }
        float dimension = typedArrayObtainStyledAttributes.hasValue(C1477.AppCompatTextView_autoSizeStepGranularity) ? typedArrayObtainStyledAttributes.getDimension(C1477.AppCompatTextView_autoSizeStepGranularity, -1.0f) : -1.0f;
        float dimension2 = typedArrayObtainStyledAttributes.hasValue(C1477.AppCompatTextView_autoSizeMinTextSize) ? typedArrayObtainStyledAttributes.getDimension(C1477.AppCompatTextView_autoSizeMinTextSize, -1.0f) : -1.0f;
        float dimension3 = typedArrayObtainStyledAttributes.hasValue(C1477.AppCompatTextView_autoSizeMaxTextSize) ? typedArrayObtainStyledAttributes.getDimension(C1477.AppCompatTextView_autoSizeMaxTextSize, -1.0f) : -1.0f;
        if (typedArrayObtainStyledAttributes.hasValue(C1477.AppCompatTextView_autoSizePresetSizes) && (resourceId = typedArrayObtainStyledAttributes.getResourceId(C1477.AppCompatTextView_autoSizePresetSizes, 0)) > 0) {
            TypedArray typedArrayObtainTypedArray = typedArrayObtainStyledAttributes.getResources().obtainTypedArray(resourceId);
            int length = typedArrayObtainTypedArray.length();
            int[] iArr = new int[length];
            if (length > 0) {
                for (int i3 = 0; i3 < length; i3++) {
                    iArr[i3] = typedArrayObtainTypedArray.getDimensionPixelSize(i3, -1);
                }
                c1643.f5340 = c1643.m3212(iArr);
                c1643.m3214();
            }
            typedArrayObtainTypedArray.recycle();
        }
        typedArrayObtainStyledAttributes.recycle();
        if (!c1643.m3215()) {
            c1643.f5335 = 0;
        } else if (c1643.f5335 == 1) {
            if (!c1643.f5341) {
                DisplayMetrics displayMetrics = c1643.f5344.getResources().getDisplayMetrics();
                if (dimension2 == -1.0f) {
                    dimension2 = TypedValue.applyDimension(2, 12.0f, displayMetrics);
                }
                if (dimension3 == -1.0f) {
                    dimension3 = TypedValue.applyDimension(2, 112.0f, displayMetrics);
                }
                if (dimension == -1.0f) {
                    dimension = 1.0f;
                }
                c1643.m3210(dimension2, dimension3, dimension);
            }
            c1643.m3213();
        }
        if (InterfaceC1963.f6450) {
            C1643 c16432 = this.f5319;
            if (c16432.f5335 != 0) {
                int[] iArr2 = c16432.f5340;
                if (iArr2.length > 0) {
                    if (this.f5311.getAutoSizeStepGranularity() != -1.0f) {
                        this.f5311.setAutoSizeTextTypeUniformWithConfiguration(Math.round(this.f5319.f5338), Math.round(this.f5319.f5339), Math.round(this.f5319.f5337), 0);
                    } else {
                        this.f5311.setAutoSizeTextTypeUniformWithPresetSizes(iArr2, 0);
                    }
                }
            }
        }
        C1689 c16893 = new C1689(context, context.obtainStyledAttributes(attributeSet, C1477.AppCompatTextView));
        int iM33052 = c16893.m3305(C1477.AppCompatTextView_drawableLeftCompat, -1);
        if (iM33052 != -1) {
            c16152 = c1615;
            drawableM3159 = c16152.m3159(context, iM33052);
        } else {
            c16152 = c1615;
            drawableM3159 = null;
        }
        int iM33053 = c16893.m3305(C1477.AppCompatTextView_drawableTopCompat, -1);
        Drawable drawableM31592 = iM33053 != -1 ? c16152.m3159(context, iM33053) : null;
        int iM33054 = c16893.m3305(C1477.AppCompatTextView_drawableRightCompat, -1);
        Drawable drawableM31593 = iM33054 != -1 ? c16152.m3159(context, iM33054) : null;
        int iM33055 = c16893.m3305(C1477.AppCompatTextView_drawableBottomCompat, -1);
        Drawable drawableM31594 = iM33055 != -1 ? c16152.m3159(context, iM33055) : null;
        int iM33056 = c16893.m3305(C1477.AppCompatTextView_drawableStartCompat, -1);
        Drawable drawableM31595 = iM33056 != -1 ? c16152.m3159(context, iM33056) : null;
        int iM33057 = c16893.m3305(C1477.AppCompatTextView_drawableEndCompat, -1);
        Drawable drawableM31596 = iM33057 != -1 ? c16152.m3159(context, iM33057) : null;
        if (drawableM31595 != null || drawableM31596 != null) {
            Drawable[] compoundDrawablesRelative = this.f5311.getCompoundDrawablesRelative();
            TextView textView3 = this.f5311;
            if (drawableM31595 == null) {
                drawableM31595 = compoundDrawablesRelative[0];
            }
            if (drawableM31592 == null) {
                drawableM31592 = compoundDrawablesRelative[1];
            }
            if (drawableM31596 == null) {
                drawableM31596 = compoundDrawablesRelative[2];
            }
            if (drawableM31594 == null) {
                drawableM31594 = compoundDrawablesRelative[3];
            }
            textView3.setCompoundDrawablesRelativeWithIntrinsicBounds(drawableM31595, drawableM31592, drawableM31596, drawableM31594);
        } else if (drawableM3159 != null || drawableM31592 != null || drawableM31593 != null || drawableM31594 != null) {
            Drawable[] compoundDrawablesRelative2 = this.f5311.getCompoundDrawablesRelative();
            if (compoundDrawablesRelative2[0] == null && compoundDrawablesRelative2[2] == null) {
                Drawable[] compoundDrawables = this.f5311.getCompoundDrawables();
                TextView textView4 = this.f5311;
                if (drawableM3159 == null) {
                    drawableM3159 = compoundDrawables[0];
                }
                if (drawableM31592 == null) {
                    drawableM31592 = compoundDrawables[1];
                }
                if (drawableM31593 == null) {
                    drawableM31593 = compoundDrawables[2];
                }
                if (drawableM31594 == null) {
                    drawableM31594 = compoundDrawables[3];
                }
                textView4.setCompoundDrawablesWithIntrinsicBounds(drawableM3159, drawableM31592, drawableM31593, drawableM31594);
            } else {
                TextView textView5 = this.f5311;
                Drawable drawable = compoundDrawablesRelative2[0];
                if (drawableM31592 == null) {
                    drawableM31592 = compoundDrawablesRelative2[1];
                }
                Drawable drawable2 = compoundDrawablesRelative2[2];
                if (drawableM31594 == null) {
                    drawableM31594 = compoundDrawablesRelative2[3];
                }
                textView5.setCompoundDrawablesRelativeWithIntrinsicBounds(drawable, drawableM31592, drawable2, drawableM31594);
            }
        }
        if (c16893.m3307(C1477.AppCompatTextView_drawableTint)) {
            ColorStateList colorStateListM32964 = c16893.m3296(C1477.AppCompatTextView_drawableTint);
            TextView textView6 = this.f5311;
            if (textView6 == 0) {
                throw null;
            }
            if (Build.VERSION.SDK_INT >= 24) {
                textView6.setCompoundDrawableTintList(colorStateListM32964);
            } else if (textView6 instanceof InterfaceC1967) {
                ((InterfaceC1967) textView6).setSupportCompoundDrawablesTintList(colorStateListM32964);
            }
        }
        if (c16893.m3307(C1477.AppCompatTextView_drawableTintMode)) {
            PorterDuff.Mode modeM3240 = C1650.m3240(c16893.m3301(C1477.AppCompatTextView_drawableTintMode, -1), null);
            TextView textView7 = this.f5311;
            if (textView7 == 0) {
                throw null;
            }
            if (Build.VERSION.SDK_INT >= 24) {
                textView7.setCompoundDrawableTintMode(modeM3240);
            } else if (textView7 instanceof InterfaceC1967) {
                ((InterfaceC1967) textView7).setSupportCompoundDrawablesTintMode(modeM3240);
            }
        }
        int iM3299 = c16893.m3299(C1477.AppCompatTextView_firstBaselineToTopHeight, -1);
        int iM32992 = c16893.m3299(C1477.AppCompatTextView_lastBaselineToBottomHeight, -1);
        int iM32993 = c16893.m3299(C1477.AppCompatTextView_lineHeight, -1);
        c16893.f5496.recycle();
        if (iM3299 != -1) {
            LayoutInflaterFactory2C1494.C1505.m2946(this.f5311, iM3299);
        }
        if (iM32992 != -1) {
            LayoutInflaterFactory2C1494.C1505.m2980(this.f5311, iM32992);
        }
        if (iM32993 != -1) {
            LayoutInflaterFactory2C1494.C1505.m2985(this.f5311, iM32993);
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m3203(int[] iArr, int i) {
        C1643 c1643 = this.f5319;
        if (c1643.m3215()) {
            int length = iArr.length;
            if (length > 0) {
                int[] iArrCopyOf = new int[length];
                if (i == 0) {
                    iArrCopyOf = Arrays.copyOf(iArr, length);
                } else {
                    DisplayMetrics displayMetrics = c1643.f5344.getResources().getDisplayMetrics();
                    for (int i2 = 0; i2 < length; i2++) {
                        iArrCopyOf[i2] = Math.round(TypedValue.applyDimension(i, iArr[i2], displayMetrics));
                    }
                }
                c1643.f5340 = c1643.m3212(iArrCopyOf);
                if (!c1643.m3214()) {
                    StringBuilder sbM4889 = C2803.m4889("None of the preset sizes is valid: ");
                    sbM4889.append(Arrays.toString(iArr));
                    throw new IllegalArgumentException(sbM4889.toString());
                }
            } else {
                c1643.f5341 = false;
            }
            if (c1643.m3213()) {
                c1643.m3209();
            }
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public boolean m3204() {
        C1643 c1643 = this.f5319;
        return c1643.m3215() && c1643.f5335 != 0;
    }
}
