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 androidx.appcompat.widget.SwitchCompat;
import ar.tvplayer.tv.R;
import defpackage.AbstractC5234;
import defpackage.C2644;
import defpackage.C3385;

/* JADX INFO: loaded from: classes3.dex */
public class SwitchPreferenceCompat extends TwoStatePreference {

    /* JADX INFO: renamed from: ˏʽˊᵰ, reason: contains not printable characters */
    public final String f806;

    /* JADX INFO: renamed from: ᵮᵟᵡ, reason: contains not printable characters */
    public final C2644 f807;

    /* JADX INFO: renamed from: ᵯˇ, reason: contains not printable characters */
    public final String f808;

    public SwitchPreferenceCompat(Context context, AttributeSet attributeSet) {
        super(context, attributeSet, R.attr.h, 0);
        this.f807 = new C2644(this, 2);
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(attributeSet, AbstractC5234.f19725, R.attr.h, 0);
        String string = typedArrayObtainStyledAttributes.getString(7);
        this.f810 = string == null ? typedArrayObtainStyledAttributes.getString(0) : string;
        if (this.f812) {
            mo428();
        }
        String string2 = typedArrayObtainStyledAttributes.getString(6);
        this.f811 = string2 == null ? typedArrayObtainStyledAttributes.getString(1) : string2;
        if (!this.f812) {
            mo428();
        }
        String string3 = typedArrayObtainStyledAttributes.getString(9);
        this.f806 = string3 == null ? typedArrayObtainStyledAttributes.getString(3) : string3;
        mo428();
        String string4 = typedArrayObtainStyledAttributes.getString(8);
        this.f808 = string4 == null ? typedArrayObtainStyledAttributes.getString(4) : string4;
        mo428();
        this.f813 = typedArrayObtainStyledAttributes.getBoolean(5, typedArrayObtainStyledAttributes.getBoolean(2, false));
        typedArrayObtainStyledAttributes.recycle();
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX INFO: renamed from: ˊᵾʽʼ, reason: contains not printable characters */
    public final void m470(View view) {
        boolean z = view instanceof SwitchCompat;
        if (z) {
            ((SwitchCompat) view).setOnCheckedChangeListener(null);
        }
        if (view instanceof Checkable) {
            ((Checkable) view).setChecked(this.f812);
        }
        if (z) {
            SwitchCompat switchCompat = (SwitchCompat) view;
            switchCompat.setTextOn(this.f806);
            switchCompat.setTextOff(this.f808);
            switchCompat.setOnCheckedChangeListener(this.f807);
        }
    }

    @Override // androidx.preference.Preference
    /* JADX INFO: renamed from: ˌᴵ */
    public final void mo425(View view) {
        super.mo425(view);
        if (((AccessibilityManager) this.f758.getSystemService("accessibility")).isEnabled()) {
            m470(view.findViewById(R.id.h));
            m471(view.findViewById(android.R.id.summary));
        }
    }

    @Override // androidx.preference.Preference
    /* JADX INFO: renamed from: ᵪᵹᵥᵻ */
    public final void mo426(C3385 c3385) {
        super.mo426(c3385);
        m470(c3385.m7744(R.id.h));
        m471(c3385.m7744(android.R.id.summary));
    }
}
