package p028j;

import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.text.InputFilter;
import android.util.AttributeSet;
import android.view.ActionMode;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.widget.Button;
import p007c.C0485a;
import p023h0.InterfaceC0808e1;
import p032k0.C1304j0;
import p032k0.InterfaceC1285b1;

/* renamed from: j.e */
/* loaded from: classes.dex */
public class C1092e extends Button implements InterfaceC0808e1, InterfaceC1285b1 {

    /* renamed from: d */
    public final C1080d f2681d;

    /* renamed from: e */
    public final C1082d1 f2682e;

    /* renamed from: f */
    public C1144m f2683f;

    public C1092e(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, C0485a.buttonStyle);
    }

    public C1092e(Context context, AttributeSet attributeSet, int i) {
        super(C1091d3.m2198b(context), attributeSet, i);
        C1073b3.m2264a(this, getContext());
        C1080d c1080d = new C1080d(this);
        this.f2681d = c1080d;
        c1080d.m2248e(attributeSet, i);
        C1082d1 c1082d1 = new C1082d1(this);
        this.f2682e = c1082d1;
        c1082d1.m2225m(attributeSet, i);
        c1082d1.m2236b();
        getEmojiTextViewHelper().m2042b(attributeSet, i);
    }

    private C1144m getEmojiTextViewHelper() {
        if (this.f2683f == null) {
            this.f2683f = new C1144m(this);
        }
        return this.f2683f;
    }

    @Override // android.widget.TextView, android.view.View
    public void drawableStateChanged() {
        super.drawableStateChanged();
        C1080d c1080d = this.f2681d;
        if (c1080d != null) {
            c1080d.m2251b();
        }
        C1082d1 c1082d1 = this.f2682e;
        if (c1082d1 != null) {
            c1082d1.m2236b();
        }
    }

    @Override // android.widget.TextView
    public int getAutoSizeMaxTextSize() {
        if (C1187q3.f2880b) {
            return super.getAutoSizeMaxTextSize();
        }
        C1082d1 c1082d1 = this.f2682e;
        if (c1082d1 != null) {
            return c1082d1.m2233e();
        }
        return -1;
    }

    @Override // android.widget.TextView
    public int getAutoSizeMinTextSize() {
        if (C1187q3.f2880b) {
            return super.getAutoSizeMinTextSize();
        }
        C1082d1 c1082d1 = this.f2682e;
        if (c1082d1 != null) {
            return c1082d1.m2232f();
        }
        return -1;
    }

    @Override // android.widget.TextView
    public int getAutoSizeStepGranularity() {
        if (C1187q3.f2880b) {
            return super.getAutoSizeStepGranularity();
        }
        C1082d1 c1082d1 = this.f2682e;
        if (c1082d1 != null) {
            return c1082d1.m2231g();
        }
        return -1;
    }

    @Override // android.widget.TextView
    public int[] getAutoSizeTextAvailableSizes() {
        if (C1187q3.f2880b) {
            return super.getAutoSizeTextAvailableSizes();
        }
        C1082d1 c1082d1 = this.f2682e;
        return c1082d1 != null ? c1082d1.m2230h() : new int[0];
    }

    @Override // android.widget.TextView
    public int getAutoSizeTextType() {
        if (C1187q3.f2880b) {
            return super.getAutoSizeTextType() == 1 ? 1 : 0;
        }
        C1082d1 c1082d1 = this.f2682e;
        if (c1082d1 != null) {
            return c1082d1.m2229i();
        }
        return 0;
    }

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

    @Override // p023h0.InterfaceC0808e1
    public ColorStateList getSupportBackgroundTintList() {
        C1080d c1080d = this.f2681d;
        if (c1080d != null) {
            return c1080d.m2250c();
        }
        return null;
    }

    @Override // p023h0.InterfaceC0808e1
    public PorterDuff.Mode getSupportBackgroundTintMode() {
        C1080d c1080d = this.f2681d;
        if (c1080d != null) {
            return c1080d.m2249d();
        }
        return null;
    }

    public ColorStateList getSupportCompoundDrawablesTintList() {
        return this.f2682e.m2228j();
    }

    public PorterDuff.Mode getSupportCompoundDrawablesTintMode() {
        return this.f2682e.m2227k();
    }

    @Override // android.view.View
    public void onInitializeAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
        super.onInitializeAccessibilityEvent(accessibilityEvent);
        accessibilityEvent.setClassName(Button.class.getName());
    }

    @Override // android.view.View
    public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
        super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
        accessibilityNodeInfo.setClassName(Button.class.getName());
    }

    @Override // android.widget.TextView, android.view.View
    public void onLayout(boolean z, int i, int i2, int i3, int i4) {
        super.onLayout(z, i, i2, i3, i4);
        C1082d1 c1082d1 = this.f2682e;
        if (c1082d1 != null) {
            c1082d1.m2223o(z, i, i2, i3, i4);
        }
    }

    @Override // android.widget.TextView
    public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
        super.onTextChanged(charSequence, i, i2, i3);
        C1082d1 c1082d1 = this.f2682e;
        if ((c1082d1 == null || C1187q3.f2880b || !c1082d1.m2226l()) ? false : true) {
            this.f2682e.m2235c();
        }
    }

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

    @Override // android.widget.TextView
    public void setAutoSizeTextTypeUniformWithConfiguration(int i, int i2, int i3, int i4) {
        if (C1187q3.f2880b) {
            super.setAutoSizeTextTypeUniformWithConfiguration(i, i2, i3, i4);
            return;
        }
        C1082d1 c1082d1 = this.f2682e;
        if (c1082d1 != null) {
            c1082d1.m2218t(i, i2, i3, i4);
        }
    }

    @Override // android.widget.TextView
    public void setAutoSizeTextTypeUniformWithPresetSizes(int[] iArr, int i) {
        if (C1187q3.f2880b) {
            super.setAutoSizeTextTypeUniformWithPresetSizes(iArr, i);
            return;
        }
        C1082d1 c1082d1 = this.f2682e;
        if (c1082d1 != null) {
            c1082d1.m2217u(iArr, i);
        }
    }

    @Override // android.widget.TextView
    public void setAutoSizeTextTypeWithDefaults(int i) {
        if (C1187q3.f2880b) {
            super.setAutoSizeTextTypeWithDefaults(i);
            return;
        }
        C1082d1 c1082d1 = this.f2682e;
        if (c1082d1 != null) {
            c1082d1.m2216v(i);
        }
    }

    @Override // android.view.View
    public void setBackgroundDrawable(Drawable drawable) {
        super.setBackgroundDrawable(drawable);
        C1080d c1080d = this.f2681d;
        if (c1080d != null) {
            c1080d.m2247f(drawable);
        }
    }

    @Override // android.view.View
    public void setBackgroundResource(int i) {
        super.setBackgroundResource(i);
        C1080d c1080d = this.f2681d;
        if (c1080d != null) {
            c1080d.m2246g(i);
        }
    }

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

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

    @Override // android.widget.TextView
    public void setFilters(InputFilter[] inputFilterArr) {
        super.setFilters(getEmojiTextViewHelper().m2043a(inputFilterArr));
    }

    public void setSupportAllCaps(boolean z) {
        C1082d1 c1082d1 = this.f2682e;
        if (c1082d1 != null) {
            c1082d1.m2219s(z);
        }
    }

    @Override // p023h0.InterfaceC0808e1
    public void setSupportBackgroundTintList(ColorStateList colorStateList) {
        C1080d c1080d = this.f2681d;
        if (c1080d != null) {
            c1080d.m2244i(colorStateList);
        }
    }

    @Override // p023h0.InterfaceC0808e1
    public void setSupportBackgroundTintMode(PorterDuff.Mode mode) {
        C1080d c1080d = this.f2681d;
        if (c1080d != null) {
            c1080d.m2243j(mode);
        }
    }

    @Override // p032k0.InterfaceC1285b1
    public void setSupportCompoundDrawablesTintList(ColorStateList colorStateList) {
        this.f2682e.m2215w(colorStateList);
        this.f2682e.m2236b();
    }

    @Override // p032k0.InterfaceC1285b1
    public void setSupportCompoundDrawablesTintMode(PorterDuff.Mode mode) {
        this.f2682e.m2214x(mode);
        this.f2682e.m2236b();
    }

    @Override // android.widget.TextView
    public void setTextAppearance(Context context, int i) {
        super.setTextAppearance(context, i);
        C1082d1 c1082d1 = this.f2682e;
        if (c1082d1 != null) {
            c1082d1.m2221q(context, i);
        }
    }

    @Override // android.widget.TextView
    public void setTextSize(int i, float f) {
        if (C1187q3.f2880b) {
            super.setTextSize(i, f);
            return;
        }
        C1082d1 c1082d1 = this.f2682e;
        if (c1082d1 != null) {
            c1082d1.m2240A(i, f);
        }
    }
}