package p028j;

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.util.AttributeSet;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.widget.MultiAutoCompleteTextView;
import p007c.C0485a;
import p013e.C0640a;
import p023h0.InterfaceC0808e1;
import p032k0.InterfaceC1285b1;

/* renamed from: j.r */
/* loaded from: classes.dex */
public class C1188r extends MultiAutoCompleteTextView implements InterfaceC0808e1, InterfaceC1285b1 {

    /* renamed from: g */
    public static final int[] f2881g = {16843126};

    /* renamed from: d */
    public final C1080d f2882d;

    /* renamed from: e */
    public final C1082d1 f2883e;

    /* renamed from: f */
    public final C1136l f2884f;

    public C1188r(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, C0485a.autoCompleteTextViewStyle);
    }

    public C1188r(Context context, AttributeSet attributeSet, int i) {
        super(C1091d3.m2198b(context), attributeSet, i);
        C1073b3.m2264a(this, getContext());
        C1106g3 m2160u = C1106g3.m2160u(getContext(), attributeSet, f2881g, i, 0);
        if (m2160u.m2163r(0)) {
            setDropDownBackgroundDrawable(m2160u.m2175f(0));
        }
        m2160u.m2159v();
        C1080d c1080d = new C1080d(this);
        this.f2882d = c1080d;
        c1080d.m2248e(attributeSet, i);
        C1082d1 c1082d1 = new C1082d1(this);
        this.f2883e = c1082d1;
        c1082d1.m2225m(attributeSet, i);
        c1082d1.m2236b();
        C1136l c1136l = new C1136l(this);
        this.f2884f = c1136l;
        c1136l.m2060c(attributeSet, i);
        m1903a(c1136l);
    }

    /* renamed from: a */
    public void m1903a(C1136l c1136l) {
        KeyListener keyListener = getKeyListener();
        if (c1136l.m2061b(keyListener)) {
            boolean isFocusable = super.isFocusable();
            boolean isClickable = super.isClickable();
            boolean isLongClickable = super.isLongClickable();
            int inputType = super.getInputType();
            KeyListener m2062a = c1136l.m2062a(keyListener);
            if (m2062a == keyListener) {
                return;
            }
            super.setKeyListener(m2062a);
            super.setRawInputType(inputType);
            super.setFocusable(isFocusable);
            super.setClickable(isClickable);
            super.setLongClickable(isLongClickable);
        }
    }

    @Override // android.widget.TextView, android.view.View
    public void drawableStateChanged() {
        super.drawableStateChanged();
        C1080d c1080d = this.f2882d;
        if (c1080d != null) {
            c1080d.m2251b();
        }
        C1082d1 c1082d1 = this.f2883e;
        if (c1082d1 != null) {
            c1082d1.m2236b();
        }
    }

    @Override // p023h0.InterfaceC0808e1
    public ColorStateList getSupportBackgroundTintList() {
        C1080d c1080d = this.f2882d;
        if (c1080d != null) {
            return c1080d.m2250c();
        }
        return null;
    }

    @Override // p023h0.InterfaceC0808e1
    public PorterDuff.Mode getSupportBackgroundTintMode() {
        C1080d c1080d = this.f2882d;
        if (c1080d != null) {
            return c1080d.m2249d();
        }
        return null;
    }

    public ColorStateList getSupportCompoundDrawablesTintList() {
        return this.f2883e.m2228j();
    }

    public PorterDuff.Mode getSupportCompoundDrawablesTintMode() {
        return this.f2883e.m2227k();
    }

    @Override // android.widget.TextView, android.view.View
    public InputConnection onCreateInputConnection(EditorInfo editorInfo) {
        return this.f2884f.m2059d(C1158n.m2004a(super.onCreateInputConnection(editorInfo), editorInfo, this), editorInfo);
    }

    @Override // android.view.View
    public void setBackgroundDrawable(Drawable drawable) {
        super.setBackgroundDrawable(drawable);
        C1080d c1080d = this.f2882d;
        if (c1080d != null) {
            c1080d.m2247f(drawable);
        }
    }

    @Override // android.view.View
    public void setBackgroundResource(int i) {
        super.setBackgroundResource(i);
        C1080d c1080d = this.f2882d;
        if (c1080d != null) {
            c1080d.m2246g(i);
        }
    }

    @Override // android.widget.TextView
    public void setCompoundDrawables(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
        super.setCompoundDrawables(drawable, drawable2, drawable3, drawable4);
        C1082d1 c1082d1 = this.f2883e;
        if (c1082d1 != null) {
            c1082d1.m2222p();
        }
    }

    @Override // android.widget.TextView
    public void setCompoundDrawablesRelative(Drawable drawable, Drawable drawable2, Drawable drawable3, Drawable drawable4) {
        super.setCompoundDrawablesRelative(drawable, drawable2, drawable3, drawable4);
        C1082d1 c1082d1 = this.f2883e;
        if (c1082d1 != null) {
            c1082d1.m2222p();
        }
    }

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

    public void setEmojiCompatEnabled(boolean z) {
        this.f2884f.m2058e(z);
    }

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

    @Override // p023h0.InterfaceC0808e1
    public void setSupportBackgroundTintList(ColorStateList colorStateList) {
        C1080d c1080d = this.f2882d;
        if (c1080d != null) {
            c1080d.m2244i(colorStateList);
        }
    }

    @Override // p023h0.InterfaceC0808e1
    public void setSupportBackgroundTintMode(PorterDuff.Mode mode) {
        C1080d c1080d = this.f2882d;
        if (c1080d != null) {
            c1080d.m2243j(mode);
        }
    }

    @Override // p032k0.InterfaceC1285b1
    public void setSupportCompoundDrawablesTintList(ColorStateList colorStateList) {
        this.f2883e.m2215w(colorStateList);
        this.f2883e.m2236b();
    }

    @Override // p032k0.InterfaceC1285b1
    public void setSupportCompoundDrawablesTintMode(PorterDuff.Mode mode) {
        this.f2883e.m2214x(mode);
        this.f2883e.m2236b();
    }

    @Override // android.widget.TextView
    public void setTextAppearance(Context context, int i) {
        super.setTextAppearance(context, i);
        C1082d1 c1082d1 = this.f2883e;
        if (c1082d1 != null) {
            c1082d1.m2221q(context, i);
        }
    }
}