package o;

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 java.lang.reflect.InvocationTargetException;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.w7, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public class C2784w7 extends Button {
    public final C2689v7 l;
    public final A8 m;
    public Y7 n;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C2784w7(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        Gf0.a(context);
        AbstractC1498if0.a(this, getContext());
        C2689v7 c2689v7 = new C2689v7(this);
        this.l = c2689v7;
        c2689v7.m(attributeSet, i);
        A8 a8 = new A8(this);
        this.m = a8;
        a8.f(attributeSet, i);
        a8.b();
        getEmojiTextViewHelper().a(attributeSet, i);
    }

    private Y7 getEmojiTextViewHelper() {
        if (this.n == null) {
            this.n = new Y7(this);
        }
        return this.n;
    }

    @Override // android.widget.TextView, android.view.View
    public final void drawableStateChanged() {
        super.drawableStateChanged();
        C2689v7 c2689v7 = this.l;
        if (c2689v7 != null) {
            c2689v7.i();
        }
        A8 a8 = this.m;
        if (a8 != null) {
            a8.b();
        }
    }

    @Override // android.widget.TextView
    public int getAutoSizeMaxTextSize() {
        if (AbstractC2457sk0.c) {
            return super.getAutoSizeMaxTextSize();
        }
        A8 a8 = this.m;
        if (a8 != null) {
            return Math.round(a8.i.e);
        }
        return -1;
    }

    @Override // android.widget.TextView
    public int getAutoSizeMinTextSize() {
        if (AbstractC2457sk0.c) {
            return super.getAutoSizeMinTextSize();
        }
        A8 a8 = this.m;
        if (a8 != null) {
            return Math.round(a8.i.d);
        }
        return -1;
    }

    @Override // android.widget.TextView
    public int getAutoSizeStepGranularity() {
        if (AbstractC2457sk0.c) {
            return super.getAutoSizeStepGranularity();
        }
        A8 a8 = this.m;
        if (a8 != null) {
            return Math.round(a8.i.c);
        }
        return -1;
    }

    @Override // android.widget.TextView
    public int[] getAutoSizeTextAvailableSizes() {
        if (AbstractC2457sk0.c) {
            return super.getAutoSizeTextAvailableSizes();
        }
        A8 a8 = this.m;
        return a8 != null ? a8.i.f : new int[0];
    }

    @Override // android.widget.TextView
    public int getAutoSizeTextType() {
        if (AbstractC2457sk0.c) {
            return super.getAutoSizeTextType() == 1 ? 1 : 0;
        }
        A8 a8 = this.m;
        if (a8 != null) {
            return a8.i.a;
        }
        return 0;
    }

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

    public ColorStateList getSupportBackgroundTintList() {
        C2689v7 c2689v7 = this.l;
        if (c2689v7 != null) {
            return c2689v7.j();
        }
        return null;
    }

    public PorterDuff.Mode getSupportBackgroundTintMode() {
        C2689v7 c2689v7 = this.l;
        if (c2689v7 != null) {
            return c2689v7.k();
        }
        return null;
    }

    public ColorStateList getSupportCompoundDrawablesTintList() {
        return this.m.d();
    }

    public PorterDuff.Mode getSupportCompoundDrawablesTintMode() {
        return this.m.e();
    }

    @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);
        A8 a8 = this.m;
        if (a8 == null || AbstractC2457sk0.c) {
            return;
        }
        a8.i.a();
    }

    @Override // android.widget.TextView
    public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
        super.onTextChanged(charSequence, i, i2, i3);
        A8 a8 = this.m;
        if (a8 != null) {
            J8 j8 = a8.i;
            if (AbstractC2457sk0.c || !j8.e()) {
                return;
            }
            j8.a();
        }
    }

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

    @Override // android.widget.TextView
    public final void setAutoSizeTextTypeUniformWithConfiguration(int i, int i2, int i3, int i4) {
        if (AbstractC2457sk0.c) {
            super.setAutoSizeTextTypeUniformWithConfiguration(i, i2, i3, i4);
            return;
        }
        A8 a8 = this.m;
        if (a8 != null) {
            a8.h(i, i2, i3, i4);
        }
    }

    @Override // android.widget.TextView
    public final void setAutoSizeTextTypeUniformWithPresetSizes(int[] iArr, int i) {
        if (AbstractC2457sk0.c) {
            super.setAutoSizeTextTypeUniformWithPresetSizes(iArr, i);
            return;
        }
        A8 a8 = this.m;
        if (a8 != null) {
            a8.i(iArr, i);
        }
    }

    @Override // android.widget.TextView
    public void setAutoSizeTextTypeWithDefaults(int i) {
        if (AbstractC2457sk0.c) {
            super.setAutoSizeTextTypeWithDefaults(i);
            return;
        }
        A8 a8 = this.m;
        if (a8 != null) {
            a8.j(i);
        }
    }

    @Override // android.view.View
    public void setBackgroundDrawable(Drawable drawable) {
        super.setBackgroundDrawable(drawable);
        C2689v7 c2689v7 = this.l;
        if (c2689v7 != null) {
            c2689v7.o();
        }
    }

    @Override // android.view.View
    public void setBackgroundResource(int i) {
        super.setBackgroundResource(i);
        C2689v7 c2689v7 = this.l;
        if (c2689v7 != null) {
            c2689v7.p(i);
        }
    }

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

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

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

    public void setSupportAllCaps(boolean z) {
        A8 a8 = this.m;
        if (a8 != null) {
            a8.a.setAllCaps(z);
        }
    }

    public void setSupportBackgroundTintList(ColorStateList colorStateList) {
        C2689v7 c2689v7 = this.l;
        if (c2689v7 != null) {
            c2689v7.r(colorStateList);
        }
    }

    public void setSupportBackgroundTintMode(PorterDuff.Mode mode) {
        C2689v7 c2689v7 = this.l;
        if (c2689v7 != null) {
            c2689v7.s(mode);
        }
    }

    public void setSupportCompoundDrawablesTintList(ColorStateList colorStateList) {
        A8 a8 = this.m;
        a8.k(colorStateList);
        a8.b();
    }

    public void setSupportCompoundDrawablesTintMode(PorterDuff.Mode mode) {
        A8 a8 = this.m;
        a8.l(mode);
        a8.b();
    }

    @Override // android.widget.TextView
    public final void setTextAppearance(Context context, int i) {
        super.setTextAppearance(context, i);
        A8 a8 = this.m;
        if (a8 != null) {
            a8.g(context, i);
        }
    }

    @Override // android.widget.TextView
    public final void setTextSize(int i, float f) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
        boolean z = AbstractC2457sk0.c;
        if (z) {
            super.setTextSize(i, f);
            return;
        }
        A8 a8 = this.m;
        if (a8 != null) {
            J8 j8 = a8.i;
            if (z || j8.e()) {
                return;
            }
            j8.f(i, f);
        }
    }
}
