package c.b.f;

import android.R;
import android.content.Context;
import android.content.res.ColorStateList;
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;

/* JADX INFO: compiled from: AppCompatMultiAutoCompleteTextView.java */
/* JADX INFO: loaded from: classes.dex */
public class t extends MultiAutoCompleteTextView {

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final g f951e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final d0 f952f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final o f953g;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public t(Context context, AttributeSet attributeSet) {
        super(context, attributeSet, com.ifpdos.debugmenu.R.attr.autoCompleteTextViewStyle);
        a1.a(context);
        y0.a(this, getContext());
        d1 d1VarO = d1.o(getContext(), attributeSet, f950b, com.ifpdos.debugmenu.R.attr.autoCompleteTextViewStyle, 0);
        if (d1VarO.m(0)) {
            setDropDownBackgroundDrawable(d1VarO.e(0));
        }
        d1VarO.f806b.recycle();
        g gVar = new g(this);
        this.f951e = gVar;
        gVar.d(attributeSet, com.ifpdos.debugmenu.R.attr.autoCompleteTextViewStyle);
        d0 d0Var = new d0(this);
        this.f952f = d0Var;
        d0Var.g(attributeSet, com.ifpdos.debugmenu.R.attr.autoCompleteTextViewStyle);
        d0Var.b();
        o oVar = new o(this);
        this.f953g = oVar;
        oVar.b(attributeSet, com.ifpdos.debugmenu.R.attr.autoCompleteTextViewStyle);
        KeyListener keyListener = getKeyListener();
        if (!(keyListener instanceof NumberKeyListener)) {
            boolean zIsFocusable = isFocusable();
            boolean zIsClickable = isClickable();
            boolean zIsLongClickable = isLongClickable();
            int inputType = getInputType();
            KeyListener keyListenerA = oVar.a(keyListener);
            if (keyListenerA == keyListener) {
                return;
            }
            super.setKeyListener(keyListenerA);
            setRawInputType(inputType);
            setFocusable(zIsFocusable);
            setClickable(zIsClickable);
            setLongClickable(zIsLongClickable);
        }
    }

    @Override // android.widget.TextView, android.view.View
    public void drawableStateChanged() {
        super.drawableStateChanged();
        g gVar = this.f951e;
        if (gVar != null) {
            gVar.a();
        }
        d0 d0Var = this.f952f;
        if (d0Var != null) {
            d0Var.b();
        }
    }

    public ColorStateList getSupportBackgroundTintList() {
        g gVar = this.f951e;
        if (gVar != null) {
            return gVar.b();
        }
        return null;
    }

    public PorterDuff.Mode getSupportBackgroundTintMode() {
        g gVar = this.f951e;
        if (gVar != null) {
            return gVar.c();
        }
        return null;
    }

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

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

    @Override // android.widget.TextView, android.view.View
    public InputConnection onCreateInputConnection(EditorInfo editorInfo) {
        InputConnection inputConnectionOnCreateInputConnection = super.onCreateInputConnection(editorInfo);
        c.b.a.f(inputConnectionOnCreateInputConnection, editorInfo, this);
        return this.f953g.c(inputConnectionOnCreateInputConnection, editorInfo);
    }

    @Override // android.view.View
    public void setBackgroundDrawable(Drawable drawable) {
        super.setBackgroundDrawable(drawable);
        g gVar = this.f951e;
        if (gVar != null) {
            gVar.e();
        }
    }

    @Override // android.view.View
    public void setBackgroundResource(int i2) {
        super.setBackgroundResource(i2);
        g gVar = this.f951e;
        if (gVar != null) {
            gVar.f(i2);
        }
    }

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

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

    @Override // android.widget.AutoCompleteTextView
    public void setDropDownBackgroundResource(int i2) {
        setDropDownBackgroundDrawable(c.b.a.e(getContext(), i2));
    }

    public void setEmojiCompatEnabled(boolean z) {
        this.f953g.f918b.a.c(z);
    }

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

    public void setSupportBackgroundTintList(ColorStateList colorStateList) {
        g gVar = this.f951e;
        if (gVar != null) {
            gVar.h(colorStateList);
        }
    }

    public void setSupportBackgroundTintMode(PorterDuff.Mode mode) {
        g gVar = this.f951e;
        if (gVar != null) {
            gVar.i(mode);
        }
    }

    public void setSupportCompoundDrawablesTintList(ColorStateList colorStateList) {
        this.f952f.m(colorStateList);
        this.f952f.b();
    }

    public void setSupportCompoundDrawablesTintMode(PorterDuff.Mode mode) {
        this.f952f.n(mode);
        this.f952f.b();
    }

    @Override // android.widget.TextView
    public void setTextAppearance(Context context, int i2) {
        super.setTextAppearance(context, i2);
        d0 d0Var = this.f952f;
        if (d0Var != null) {
            d0Var.h(context, i2);
        }
    }
}
