package n;

import N1.C0198b;
import android.R;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.text.method.KeyListener;
import android.text.method.NumberKeyListener;
import android.util.AttributeSet;
import android.view.ActionMode;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.widget.AutoCompleteTextView;
import com.google.android.gms.internal.measurement.X1;
import e0.C0853a;

/* JADX INFO: renamed from: n.l, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public abstract class AbstractC1220l extends AutoCompleteTextView implements P.l {

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public static final int[] f14895t = {R.attr.popupBackground};

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final C0198b f14896q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final C1187E f14897r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final C0853a f14898s;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public AbstractC1220l(Context context, AttributeSet attributeSet) {
        super(context, attributeSet, com.martsnew.tv.R.attr.autoCompleteTextViewStyle);
        H0.a(context);
        G0.a(this, getContext());
        com.google.android.material.datepicker.c cVarZ = com.google.android.material.datepicker.c.z(getContext(), attributeSet, f14895t, com.martsnew.tv.R.attr.autoCompleteTextViewStyle);
        if (((TypedArray) cVarZ.f10220s).hasValue(0)) {
            setDropDownBackgroundDrawable(cVarZ.u(0));
        }
        cVarZ.B();
        C0198b c0198b = new C0198b(this);
        this.f14896q = c0198b;
        c0198b.n(attributeSet, com.martsnew.tv.R.attr.autoCompleteTextViewStyle);
        C1187E c1187e = new C1187E(this);
        this.f14897r = c1187e;
        c1187e.d(attributeSet, com.martsnew.tv.R.attr.autoCompleteTextViewStyle);
        c1187e.b();
        C0853a c0853a = new C0853a(this, 14);
        this.f14898s = c0853a;
        c0853a.A(attributeSet, com.martsnew.tv.R.attr.autoCompleteTextViewStyle);
        KeyListener keyListener = getKeyListener();
        if (keyListener instanceof NumberKeyListener) {
            return;
        }
        boolean zIsFocusable = super.isFocusable();
        boolean zIsClickable = super.isClickable();
        boolean zIsLongClickable = super.isLongClickable();
        int inputType = super.getInputType();
        KeyListener keyListenerY = c0853a.y(keyListener);
        if (keyListenerY == keyListener) {
            return;
        }
        super.setKeyListener(keyListenerY);
        super.setRawInputType(inputType);
        super.setFocusable(zIsFocusable);
        super.setClickable(zIsClickable);
        super.setLongClickable(zIsLongClickable);
    }

    @Override // android.widget.TextView, android.view.View
    public final void drawableStateChanged() {
        super.drawableStateChanged();
        C0198b c0198b = this.f14896q;
        if (c0198b != null) {
            c0198b.b();
        }
        C1187E c1187e = this.f14897r;
        if (c1187e != null) {
            c1187e.b();
        }
    }

    @Override // android.widget.TextView
    public ActionMode.Callback getCustomSelectionActionModeCallback() {
        return W3.b.z(super.getCustomSelectionActionModeCallback());
    }

    public ColorStateList getSupportBackgroundTintList() {
        C0198b c0198b = this.f14896q;
        if (c0198b != null) {
            return c0198b.k();
        }
        return null;
    }

    public PorterDuff.Mode getSupportBackgroundTintMode() {
        C0198b c0198b = this.f14896q;
        if (c0198b != null) {
            return c0198b.l();
        }
        return null;
    }

    public ColorStateList getSupportCompoundDrawablesTintList() {
        k7.i iVar = this.f14897r.f14698h;
        if (iVar != null) {
            return (ColorStateList) iVar.f14082c;
        }
        return null;
    }

    public PorterDuff.Mode getSupportCompoundDrawablesTintMode() {
        k7.i iVar = this.f14897r.f14698h;
        if (iVar != null) {
            return (PorterDuff.Mode) iVar.f14083d;
        }
        return null;
    }

    @Override // android.widget.TextView, android.view.View
    public InputConnection onCreateInputConnection(EditorInfo editorInfo) {
        InputConnection inputConnectionOnCreateInputConnection = super.onCreateInputConnection(editorInfo);
        X1.x(editorInfo, inputConnectionOnCreateInputConnection, this);
        return this.f14898s.C(inputConnectionOnCreateInputConnection, editorInfo);
    }

    @Override // android.view.View
    public void setBackgroundDrawable(Drawable drawable) {
        super.setBackgroundDrawable(drawable);
        C0198b c0198b = this.f14896q;
        if (c0198b != null) {
            c0198b.p();
        }
    }

    @Override // android.view.View
    public void setBackgroundResource(int i) {
        super.setBackgroundResource(i);
        C0198b c0198b = this.f14896q;
        if (c0198b != null) {
            c0198b.q(i);
        }
    }

    @Override // android.widget.TextView
    public final void setCompoundDrawables(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
        super.setCompoundDrawables(drawable, drawable2, drawable3, drawable4);
        C1187E c1187e = this.f14897r;
        if (c1187e != null) {
            c1187e.b();
        }
    }

    @Override // android.widget.TextView
    public final void setCompoundDrawablesRelative(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
        super.setCompoundDrawablesRelative(drawable, drawable2, drawable3, drawable4);
        C1187E c1187e = this.f14897r;
        if (c1187e != null) {
            c1187e.b();
        }
    }

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

    @Override // android.widget.AutoCompleteTextView
    public void setDropDownBackgroundResource(int i) {
        setDropDownBackgroundDrawable(android.support.v4.media.session.a.l(getContext(), i));
    }

    public void setEmojiCompatEnabled(boolean z8) {
        this.f14898s.J(z8);
    }

    @Override // android.widget.TextView
    public void setKeyListener(KeyListener keyListener) {
        super.setKeyListener(this.f14898s.y(keyListener));
    }

    public void setSupportBackgroundTintList(ColorStateList colorStateList) {
        C0198b c0198b = this.f14896q;
        if (c0198b != null) {
            c0198b.v(colorStateList);
        }
    }

    public void setSupportBackgroundTintMode(PorterDuff.Mode mode) {
        C0198b c0198b = this.f14896q;
        if (c0198b != null) {
            c0198b.w(mode);
        }
    }

    @Override // P.l
    public void setSupportCompoundDrawablesTintList(ColorStateList colorStateList) {
        C1187E c1187e = this.f14897r;
        c1187e.j(colorStateList);
        c1187e.b();
    }

    @Override // P.l
    public void setSupportCompoundDrawablesTintMode(PorterDuff.Mode mode) {
        C1187E c1187e = this.f14897r;
        c1187e.k(mode);
        c1187e.b();
    }

    @Override // android.widget.TextView
    public final void setTextAppearance(Context context, int i) {
        super.setTextAppearance(context, i);
        C1187E c1187e = this.f14897r;
        if (c1187e != null) {
            c1187e.e(context, i);
        }
    }
}
