package o;

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.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.widget.MultiAutoCompleteTextView;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.c8, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0883c8 extends MultiAutoCompleteTextView {

    /* renamed from: o, reason: collision with root package name */
    public static final int[] f472o = {R.attr.popupBackground};
    public final C2689v7 l;
    public final A8 m;
    public final C3040yr n;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0883c8(Context context, AttributeSet attributeSet) {
        super(context, attributeSet, com.google.android.gms.common.R.attr.autoCompleteTextViewStyle);
        Gf0.a(context);
        AbstractC1498if0.a(this, getContext());
        C70 c70R = C70.r(getContext(), attributeSet, f472o, com.google.android.gms.common.R.attr.autoCompleteTextViewStyle);
        if (((TypedArray) c70R.n).hasValue(0)) {
            setDropDownBackgroundDrawable(c70R.m(0));
        }
        c70R.t();
        C2689v7 c2689v7 = new C2689v7(this);
        this.l = c2689v7;
        c2689v7.m(attributeSet, com.google.android.gms.common.R.attr.autoCompleteTextViewStyle);
        A8 a8 = new A8(this);
        this.m = a8;
        a8.f(attributeSet, com.google.android.gms.common.R.attr.autoCompleteTextViewStyle);
        a8.b();
        C3040yr c3040yr = new C3040yr(this);
        this.n = c3040yr;
        c3040yr.g(attributeSet, com.google.android.gms.common.R.attr.autoCompleteTextViewStyle);
        KeyListener keyListener = getKeyListener();
        if (keyListener instanceof NumberKeyListener) {
            return;
        }
        boolean zIsFocusable = isFocusable();
        boolean zIsClickable = isClickable();
        boolean zIsLongClickable = isLongClickable();
        int inputType = getInputType();
        KeyListener keyListenerD = c3040yr.d(keyListener);
        if (keyListenerD == keyListener) {
            return;
        }
        super.setKeyListener(keyListenerD);
        setRawInputType(inputType);
        setFocusable(zIsFocusable);
        setClickable(zIsClickable);
        setLongClickable(zIsLongClickable);
    }

    @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();
        }
    }

    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.widget.TextView, android.view.View
    public final InputConnection onCreateInputConnection(EditorInfo editorInfo) {
        InputConnection inputConnectionOnCreateInputConnection = super.onCreateInputConnection(editorInfo);
        AbstractC1155f00.B(inputConnectionOnCreateInputConnection, editorInfo, this);
        return this.n.h(inputConnectionOnCreateInputConnection, editorInfo);
    }

    @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 final void setCompoundDrawables(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
        super.setCompoundDrawables(drawable, drawable2, drawable3, drawable4);
        A8 a8 = this.m;
        if (a8 != null) {
            a8.b();
        }
    }

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

    @Override // android.widget.AutoCompleteTextView
    public void setDropDownBackgroundResource(int i) {
        setDropDownBackgroundDrawable(C80.x(getContext(), i));
    }

    public void setEmojiCompatEnabled(boolean z) {
        this.n.j(z);
    }

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

    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);
        }
    }
}
