package androidx.preference;

import android.content.Context;
import android.content.res.TypedArray;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.AbsSavedState;
import ar.tvplayer.tv.R;
import defpackage.AbstractC4608;
import defpackage.C3874;
import defpackage.InterfaceC0955;

/* loaded from: classes3.dex */
public class ListPreference extends DialogPreference {

    /* renamed from: ʾˋˊᵽ, reason: contains not printable characters */
    public String f733;

    /* renamed from: ʿᵘˆ, reason: contains not printable characters */
    public final CharSequence[] f734;

    /* renamed from: ᵎʾ, reason: contains not printable characters */
    public boolean f735;

    /* renamed from: ᵰʖʢ, reason: contains not printable characters */
    public final CharSequence[] f736;

    /* renamed from: ᵺᵜᵰ, reason: contains not printable characters */
    public String f737;

    public ListPreference(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, ˋˌ.ᵶᵷᵕ(context, R.attr._11_res_0x7f0401f7, android.R.attr.dialogPreferenceStyle));
    }

    public ListPreference(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AbstractC4608.f17075, i, 0);
        CharSequence[] textArray = typedArrayObtainStyledAttributes.getTextArray(2);
        this.f734 = textArray == null ? typedArrayObtainStyledAttributes.getTextArray(0) : textArray;
        CharSequence[] textArray2 = typedArrayObtainStyledAttributes.getTextArray(3);
        this.f736 = textArray2 == null ? typedArrayObtainStyledAttributes.getTextArray(1) : textArray2;
        if (typedArrayObtainStyledAttributes.getBoolean(4, typedArrayObtainStyledAttributes.getBoolean(4, false))) {
            if (ˊᵻ.ᵮᵠـˌ == null) {
                ˊᵻ.ᵮᵠـˌ = new ˊᵻ(28);
            }
            this.f746 = ˊᵻ.ᵮᵠـˌ;
            mo428();
        }
        typedArrayObtainStyledAttributes.recycle();
        TypedArray typedArrayObtainStyledAttributes2 = context.obtainStyledAttributes(attributeSet, AbstractC4608.f17077, i, 0);
        String string = typedArrayObtainStyledAttributes2.getString(33);
        this.f737 = string == null ? typedArrayObtainStyledAttributes2.getString(7) : string;
        typedArrayObtainStyledAttributes2.recycle();
    }

    @Override // androidx.preference.Preference
    /* renamed from: ˑᵱ */
    public final void mo429(Object obj) {
        m438(m444((String) obj));
    }

    /* renamed from: ᐧﾞ, reason: contains not printable characters */
    public final int m435(String str) {
        CharSequence[] charSequenceArr;
        if (str == null || (charSequenceArr = this.f736) == null) {
            return -1;
        }
        for (int length = charSequenceArr.length - 1; length >= 0; length--) {
            if (TextUtils.equals(charSequenceArr[length].toString(), str)) {
                return length;
            }
        }
        return -1;
    }

    @Override // androidx.preference.Preference
    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public final CharSequence mo436() {
        CharSequence[] charSequenceArr;
        InterfaceC0955 interfaceC0955 = this.f746;
        if (interfaceC0955 != null) {
            return interfaceC0955.m3234(this);
        }
        int iM435 = m435(this.f733);
        CharSequence charSequence = (iM435 < 0 || (charSequenceArr = this.f734) == null) ? null : charSequenceArr[iM435];
        CharSequence charSequenceMo436 = super.mo436();
        String str = this.f737;
        if (str != null) {
            if (charSequence == null) {
                charSequence = "";
            }
            String str2 = String.format(str, charSequence);
            if (!TextUtils.equals(str2, charSequenceMo436)) {
                return str2;
            }
        }
        return charSequenceMo436;
    }

    @Override // androidx.preference.Preference
    /* renamed from: ᵞʡ */
    public final void mo431(Parcelable parcelable) {
        if (!parcelable.getClass().equals(C3874.class)) {
            super.mo431(parcelable);
            return;
        }
        C3874 c3874 = (C3874) parcelable;
        super.mo431(c3874.getSuperState());
        m438(c3874.f14412);
    }

    @Override // androidx.preference.Preference
    /* renamed from: ᵡˎ, reason: contains not printable characters */
    public final void mo437(CharSequence charSequence) {
        super.mo437(charSequence);
        if (charSequence == null) {
            this.f737 = null;
        } else {
            this.f737 = charSequence.toString();
        }
    }

    @Override // androidx.preference.Preference
    /* renamed from: ᵨᵳʝ */
    public final Parcelable mo432() {
        super.mo432();
        AbsSavedState absSavedState = AbsSavedState.EMPTY_STATE;
        if (this.f755) {
            return absSavedState;
        }
        C3874 c3874 = new C3874();
        c3874.f14412 = this.f733;
        return c3874;
    }

    /* renamed from: ᵶʔᵢˊ, reason: contains not printable characters */
    public final void m438(String str) {
        boolean zEquals = TextUtils.equals(this.f733, str);
        if (zEquals && this.f735) {
            return;
        }
        this.f733 = str;
        this.f735 = true;
        m451(str);
        if (zEquals) {
            return;
        }
        mo428();
    }

    @Override // androidx.preference.Preference
    /* renamed from: ᵸʓᵠ */
    public final Object mo434(TypedArray typedArray, int i) {
        return typedArray.getString(i);
    }
}
