package androidx.preference;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.view.accessibility.AccessibilityManager;
import android.widget.Checkable;
import android.widget.Switch;
import ar.tvplayer.tv.R;
import defpackage.AbstractC4608;
import defpackage.C2102;
import defpackage.C2639;

/* loaded from: classes3.dex */
public class SwitchPreference extends TwoStatePreference {

    /* renamed from: ʿᵘˆ, reason: contains not printable characters */
    public final String f803;

    /* renamed from: ᵠᵪˀᵻ, reason: contains not printable characters */
    public final C2639 f804;

    /* renamed from: ᵰʖʢ, reason: contains not printable characters */
    public final String f805;

    public SwitchPreference(Context context, AttributeSet attributeSet) {
        this(context, attributeSet, ˋˌ.ᵶᵷᵕ(context, R.attr._11_res_0x7f0405fd, android.R.attr.switchPreferenceStyle), 0);
    }

    public SwitchPreference(Context context, AttributeSet attributeSet, int i, int i2) {
        super(context, attributeSet, i, i2);
        this.f804 = new C2639(this, 1);
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AbstractC4608.f17076, i, i2);
        String string = typedArrayObtainStyledAttributes.getString(7);
        this.f811 = string == null ? typedArrayObtainStyledAttributes.getString(0) : string;
        if (this.f810) {
            mo428();
        }
        String string2 = typedArrayObtainStyledAttributes.getString(6);
        this.f813 = string2 == null ? typedArrayObtainStyledAttributes.getString(1) : string2;
        if (!this.f810) {
            mo428();
        }
        String string3 = typedArrayObtainStyledAttributes.getString(9);
        this.f803 = string3 == null ? typedArrayObtainStyledAttributes.getString(3) : string3;
        mo428();
        String string4 = typedArrayObtainStyledAttributes.getString(8);
        this.f805 = string4 == null ? typedArrayObtainStyledAttributes.getString(4) : string4;
        mo428();
        this.f809 = typedArrayObtainStyledAttributes.getBoolean(5, typedArrayObtainStyledAttributes.getBoolean(2, false));
        typedArrayObtainStyledAttributes.recycle();
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* renamed from: ˁˑᵰ, reason: contains not printable characters */
    public final void m469(View view) {
        boolean z = view instanceof Switch;
        if (z) {
            ((Switch) view).setOnCheckedChangeListener(null);
        }
        if (view instanceof Checkable) {
            ((Checkable) view).setChecked(this.f810);
        }
        if (z) {
            Switch r4 = (Switch) view;
            r4.setTextOn(this.f803);
            r4.setTextOff(this.f805);
            r4.setOnCheckedChangeListener(this.f804);
        }
    }

    @Override // androidx.preference.Preference
    /* renamed from: ᵧᵾˀˈ */
    public final void mo425(View view) {
        super.mo425(view);
        if (((AccessibilityManager) this.f769.getSystemService("accessibility")).isEnabled()) {
            m469(view.findViewById(android.R.id.switch_widget));
            m472(view.findViewById(android.R.id.summary));
        }
    }

    @Override // androidx.preference.Preference
    /* renamed from: ᵳٴᵶ */
    public void mo426(C2102 c2102) {
        super.mo426(c2102);
        m469(c2102.m5691(android.R.id.switch_widget));
        m472(c2102.m5691(android.R.id.summary));
    }
}
