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.ActionMode;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.widget.AutoCompleteTextView;
import java.util.Objects;

/* JADX INFO: compiled from: AppCompatAutoCompleteTextView.java */
/* JADX INFO: loaded from: classes.dex */
public class f extends AutoCompleteTextView {

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

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

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

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

    public f(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, com.ifpdos.debugmenu.R.attr.autoCompleteTextViewStyle);
    }

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

    @Override // android.widget.TextView
    public ActionMode.Callback getCustomSelectionActionModeCallback() {
        return c.f.b.h.K(super.getCustomSelectionActionModeCallback());
    }

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

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

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

    public PorterDuff.Mode getSupportCompoundDrawablesTintMode() {
        return this.f815f.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.f816g.c(inputConnectionOnCreateInputConnection, editorInfo);
    }

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

    @Override // android.view.View
    public void setBackgroundResource(int i2) {
        super.setBackgroundResource(i2);
        g gVar = this.f814e;
        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.f815f;
        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.f815f;
        if (d0Var != null) {
            d0Var.b();
        }
    }

    @Override // android.widget.TextView
    public void setCustomSelectionActionModeCallback(ActionMode.Callback callback) {
        super.setCustomSelectionActionModeCallback(c.f.b.h.L(this, callback));
    }

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

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

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

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

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

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

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

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

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