package defpackage;

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.drawable.Drawable;
import android.util.AttributeSet;
import android.view.ActionMode;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.widget.CheckedTextView;
import ar.tvplayer.tv.R;

/* renamed from: ᵻʽᵯ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C5174 extends CheckedTextView implements InterfaceC4415 {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final C1611 f19263;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final C3855 f19264;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public C1471 f19265;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final C2956 f19266;

    public C5174(Context context, AttributeSet attributeSet) {
        int resourceId;
        int resourceId2;
        super(context, attributeSet, R.attr._11_res_0x7f0400f3);
        AbstractC3247.m7608(getContext(), this);
        C2956 c2956 = new C2956(this);
        this.f19266 = c2956;
        c2956.m7246(attributeSet, R.attr._11_res_0x7f0400f3);
        c2956.m7244();
        C1611 c1611 = new C1611(this);
        this.f19263 = c1611;
        c1611.m4617(attributeSet, R.attr._11_res_0x7f0400f3);
        this.f19264 = new C3855(this);
        Context context2 = getContext();
        int[] iArr = AbstractC0542.f2805;
        C1570 c1570M4541 = C1570.m4541(context2, attributeSet, iArr, R.attr._11_res_0x7f0400f3);
        TypedArray typedArray = (TypedArray) c1570M4541.f6230;
        AbstractC2873.m7025(this, getContext(), iArr, attributeSet, (TypedArray) c1570M4541.f6230, R.attr._11_res_0x7f0400f3);
        try {
            if (typedArray.hasValue(1) && (resourceId2 = typedArray.getResourceId(1, 0)) != 0) {
                try {
                    setCheckMarkDrawable(ᵕˏᵛ.ˑᵥˁ(getContext(), resourceId2));
                } catch (Resources.NotFoundException unused) {
                }
            } else if (typedArray.hasValue(0) && (resourceId = typedArray.getResourceId(0, 0)) != 0) {
                setCheckMarkDrawable(ᵕˏᵛ.ˑᵥˁ(getContext(), resourceId));
            }
            if (typedArray.hasValue(2)) {
                setCheckMarkTintList(c1570M4541.m4549(2));
            }
            if (typedArray.hasValue(3)) {
                setCheckMarkTintMode(AbstractC1991.m5512(typedArray.getInt(3, -1), null));
            }
            c1570M4541.m4542();
            getEmojiTextViewHelper().m4380(attributeSet, R.attr._11_res_0x7f0400f3);
        } catch (Throwable th) {
            c1570M4541.m4542();
            throw th;
        }
    }

    private C1471 getEmojiTextViewHelper() {
        if (this.f19265 == null) {
            this.f19265 = new C1471(this);
        }
        return this.f19265;
    }

    @Override // android.widget.CheckedTextView, android.widget.TextView, android.view.View
    public final void drawableStateChanged() {
        super.drawableStateChanged();
        C2956 c2956 = this.f19266;
        if (c2956 != null) {
            c2956.m7244();
        }
        C1611 c1611 = this.f19263;
        if (c1611 != null) {
            c1611.m4619();
        }
        C3855 c3855 = this.f19264;
        if (c3855 != null) {
            c3855.m8502();
        }
    }

    @Override // android.widget.TextView
    public ActionMode.Callback getCustomSelectionActionModeCallback() {
        return AbstractC0494.m2142(super.getCustomSelectionActionModeCallback());
    }

    public ColorStateList getSupportBackgroundTintList() {
        C1611 c1611 = this.f19263;
        if (c1611 != null) {
            return c1611.m4620();
        }
        return null;
    }

    public PorterDuff.Mode getSupportBackgroundTintMode() {
        C1611 c1611 = this.f19263;
        if (c1611 != null) {
            return c1611.m4622();
        }
        return null;
    }

    public ColorStateList getSupportCheckMarkTintList() {
        C3855 c3855 = this.f19264;
        if (c3855 != null) {
            return c3855.f14331;
        }
        return null;
    }

    public PorterDuff.Mode getSupportCheckMarkTintMode() {
        C3855 c3855 = this.f19264;
        if (c3855 != null) {
            return c3855.f14332;
        }
        return null;
    }

    public ColorStateList getSupportCompoundDrawablesTintList() {
        return this.f19266.m7237();
    }

    public PorterDuff.Mode getSupportCompoundDrawablesTintMode() {
        return this.f19266.m7236();
    }

    @Override // android.widget.TextView, android.view.View
    public final InputConnection onCreateInputConnection(EditorInfo editorInfo) {
        InputConnection inputConnectionOnCreateInputConnection = super.onCreateInputConnection(editorInfo);
        ˉˇʨ.ᵡⁱᵥ(editorInfo, inputConnectionOnCreateInputConnection, this);
        return inputConnectionOnCreateInputConnection;
    }

    @Override // android.widget.TextView
    public void setAllCaps(boolean z) {
        super.setAllCaps(z);
        getEmojiTextViewHelper().m4378(z);
    }

    @Override // android.view.View
    public void setBackgroundDrawable(Drawable drawable) {
        super.setBackgroundDrawable(drawable);
        C1611 c1611 = this.f19263;
        if (c1611 != null) {
            c1611.m4618();
        }
    }

    @Override // android.view.View
    public void setBackgroundResource(int i) {
        super.setBackgroundResource(i);
        C1611 c1611 = this.f19263;
        if (c1611 != null) {
            c1611.m4602(i);
        }
    }

    @Override // android.widget.CheckedTextView
    public void setCheckMarkDrawable(int i) {
        setCheckMarkDrawable(ᵕˏᵛ.ˑᵥˁ(getContext(), i));
    }

    @Override // android.widget.CheckedTextView
    public void setCheckMarkDrawable(Drawable drawable) {
        super.setCheckMarkDrawable(drawable);
        C3855 c3855 = this.f19264;
        if (c3855 != null) {
            if (c3855.f14328) {
                c3855.f14328 = false;
            } else {
                c3855.f14328 = true;
                c3855.m8502();
            }
        }
    }

    @Override // android.widget.TextView
    public final void setCompoundDrawables(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
        super.setCompoundDrawables(drawable, drawable2, drawable3, drawable4);
        C2956 c2956 = this.f19266;
        if (c2956 != null) {
            c2956.m7244();
        }
    }

    @Override // android.widget.TextView
    public final void setCompoundDrawablesRelative(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
        super.setCompoundDrawablesRelative(drawable, drawable2, drawable3, drawable4);
        C2956 c2956 = this.f19266;
        if (c2956 != null) {
            c2956.m7244();
        }
    }

    @Override // android.widget.TextView
    public void setCustomSelectionActionModeCallback(ActionMode.Callback callback) {
        super.setCustomSelectionActionModeCallback(AbstractC0494.m2149(callback, this));
    }

    public void setEmojiCompatEnabled(boolean z) {
        getEmojiTextViewHelper().m4381(z);
    }

    public void setSupportBackgroundTintList(ColorStateList colorStateList) {
        C1611 c1611 = this.f19263;
        if (c1611 != null) {
            c1611.m4611(colorStateList);
        }
    }

    public void setSupportBackgroundTintMode(PorterDuff.Mode mode) {
        C1611 c1611 = this.f19263;
        if (c1611 != null) {
            c1611.m4626(mode);
        }
    }

    public void setSupportCheckMarkTintList(ColorStateList colorStateList) {
        C3855 c3855 = this.f19264;
        if (c3855 != null) {
            c3855.f14331 = colorStateList;
            c3855.f14330 = true;
            c3855.m8502();
        }
    }

    public void setSupportCheckMarkTintMode(PorterDuff.Mode mode) {
        C3855 c3855 = this.f19264;
        if (c3855 != null) {
            c3855.f14332 = mode;
            c3855.f14333 = true;
            c3855.m8502();
        }
    }

    @Override // defpackage.InterfaceC4415
    public void setSupportCompoundDrawablesTintList(ColorStateList colorStateList) {
        C2956 c2956 = this.f19266;
        c2956.m7241(colorStateList);
        c2956.m7244();
    }

    @Override // defpackage.InterfaceC4415
    public void setSupportCompoundDrawablesTintMode(PorterDuff.Mode mode) {
        C2956 c2956 = this.f19266;
        c2956.m7243(mode);
        c2956.m7244();
    }

    @Override // android.widget.TextView
    public final void setTextAppearance(Context context, int i) {
        super.setTextAppearance(context, i);
        C2956 c2956 = this.f19266;
        if (c2956 != null) {
            c2956.m7239(context, i);
        }
    }
}
