package androidx.preference;

import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.TypedArray;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.view.AbsSavedState;
import ar.tvplayer.tv.R;
import defpackage.AbstractC4608;
import defpackage.C0190;
import defpackage.C3408;
import java.util.HashSet;
import java.util.Set;

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

    /* renamed from: ʾˋˊᵽ, reason: contains not printable characters */
    public final HashSet f738;

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

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

    /* JADX WARN: Illegal instructions before constructor call */
    public MultiSelectListPreference(Context context, AttributeSet attributeSet) {
        int i = ˋˌ.ᵶᵷᵕ(context, R.attr._11_res_0x7f0401f7, android.R.attr.dialogPreferenceStyle);
        super(context, attributeSet, i);
        this.f738 = new HashSet();
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AbstractC4608.f17078, i, 0);
        CharSequence[] textArray = typedArrayObtainStyledAttributes.getTextArray(2);
        this.f739 = textArray == null ? typedArrayObtainStyledAttributes.getTextArray(0) : textArray;
        CharSequence[] textArray2 = typedArrayObtainStyledAttributes.getTextArray(3);
        this.f740 = textArray2 == null ? typedArrayObtainStyledAttributes.getTextArray(1) : textArray2;
        typedArrayObtainStyledAttributes.recycle();
    }

    @Override // androidx.preference.Preference
    /* renamed from: ˑᵱ */
    public final void mo429(Object obj) {
        Set<String> stringSet = (Set) obj;
        if (m454() && m459() == null) {
            stringSet = this.f765.m10458().getStringSet(this.f775, stringSet);
        }
        m439(stringSet);
    }

    /* renamed from: ᐧﾞ, reason: contains not printable characters */
    public final void m439(Set set) {
        HashSet hashSet = this.f738;
        hashSet.clear();
        hashSet.addAll(set);
        if (m454()) {
            Set<String> stringSet = null;
            if (m454() && m459() == null) {
                stringSet = this.f765.m10458().getStringSet(this.f775, null);
            }
            if (!set.equals(stringSet)) {
                if (m459() != null) {
                    C0190.m1432("Not implemented on this data store");
                    return;
                }
                SharedPreferences.Editor editorM10457 = this.f765.m10457();
                editorM10457.putStringSet(this.f775, set);
                if (!this.f765.f18589) {
                    editorM10457.apply();
                }
            }
        }
        mo428();
    }

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

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

    @Override // androidx.preference.Preference
    /* renamed from: ᵸʓᵠ */
    public final Object mo434(TypedArray typedArray, int i) {
        CharSequence[] textArray = typedArray.getTextArray(i);
        HashSet hashSet = new HashSet();
        for (CharSequence charSequence : textArray) {
            hashSet.add(charSequence.toString());
        }
        return hashSet;
    }
}
