package p000.p001.p002.p003.p004;

import android.graphics.drawable.Drawable;
import android.os.Bundle;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
import ar.tvplayer.core.data.prefs.ރ;
import ar.tvplayer.core.data.repositories.ޓ;
import ar.tvplayer.core.data.repositories.ޗ;
import ar.tvplayer.core.data.repositories.Ⴧ;
import ar.tvplayer.core.domain.ލ;
import ar.tvplayer.core.domain2.ނ;
import java.util.Iterator;
import p000.p001.p002.p003.C0663;
import p025.p026.C1340;
import p025.p026.C1356;
import p037.p089.p090.ActivityC1999;
import p037.p091.p093.AbstractC2098;
import p138.p176.p177.p242.p246.p251.C4303;
import p402.p405.InterfaceC6575;
import p402.p411.p413.C6635;
import p402.p417.C6659;
import p402.p417.C6662;
import p402.p417.C6664;

/* JADX INFO: renamed from: ނ.֏.֏.֏.֏.ބ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C0561 extends AbstractC2098 {

    /* JADX INFO: renamed from: ލ, reason: contains not printable characters */
    public String f2828;

    @Override // p037.p106.AbstractC2273, androidx.fragment.app.Fragment
    public /* synthetic */ void onDestroyView() {
        super.onDestroyView();
    }

    @Override // p037.p106.AbstractC2273
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void mo1836(Bundle bundle, String str) {
        PreferenceScreen preferenceScreenM4334 = this.f7243.m4334(getContext());
        preferenceScreenM4334.m389((CharSequence) getString(C0663.player_audio_offset));
        m4320(preferenceScreenM4334);
        Drawable drawable = ލ.֏(this, false, 1);
        Drawable drawable2 = ލ.ޅ(this);
        C6659 c6659M9845 = C6664.m9845(new C6662(-1000, 1000), 50);
        int i = c6659M9845.f19412;
        int i2 = c6659M9845.f19413;
        int i3 = c6659M9845.f19414;
        if (i3 < 0 ? i >= i2 : i <= i2) {
            int i4 = i;
            while (true) {
                String strValueOf = String.valueOf(i4);
                String strM1831 = C0559.m1831(this, i4);
                Integer num = C0559.f2827;
                boolean z = num != null && i4 == num.intValue();
                int i5 = i4;
                ލ.֏(this, strValueOf, strM1831, (CharSequence) null, z ? drawable2 : drawable, false, false, 0, 116);
                if (z) {
                    this.f2828 = strValueOf;
                    m4319(strValueOf);
                }
                if (i5 == i2) {
                    break;
                } else {
                    i4 = i5 + i3;
                }
            }
        }
        if (C0559.f2824 != null) {
            String string = getString(C0663.player_apply_to_all_channels);
            C6635.m9823((Object) string, "getString(R.string.player_apply_to_all_channels)");
            ލ.֏(this, "applyToAllChannels", string, (CharSequence) null, (Drawable) null, false, false, 0, 124);
        }
    }

    @Override // p037.p106.AbstractC2273, p037.p106.C2287.InterfaceC2290
    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public boolean mo1837(Preference preference) {
        if (preference == null) {
            C6635.m9824("pref");
            throw null;
        }
        if (super.mo1837(preference)) {
            return true;
        }
        String str = preference.f1018;
        if (str != null && str.hashCode() == 2080198216 && str.equals("applyToAllChannels")) {
            String str2 = this.f2828;
            if (str2 != null) {
                int i = Integer.parseInt(str2);
                if (ރ.ߠ == null) {
                    throw null;
                }
                int iIntValue = Integer.valueOf(i).intValue();
                ރ r1 = ރ.ߠ;
                if (r1 == null) {
                    throw null;
                }
                ރ.ŀ.m9836(r1, ރ.ށ[167], Integer.valueOf(iIntValue));
                C4303.m7160(C1356.f4507, C1340.f4488, null, new ޓ((InterfaceC6575) null), 2, null);
            }
            ActivityC1999 activity = getActivity();
            if (activity != null) {
                activity.finishAfterTransition();
            }
        } else if (!C6635.m9825((Object) this.f2828, (Object) preference.f1018)) {
            this.f2828 = preference.f1018;
            ލ.֏(this, preference);
            String str3 = preference.f1018;
            C6635.m9823((Object) str3, "pref.key");
            int i2 = Integer.parseInt(str3);
            Iterator<T> it = C0559.f2826.iterator();
            while (it.hasNext()) {
                ((ނ) it.next()).֏ = i2;
            }
            Long l = C0559.f2824;
            if (l == null) {
                Long l2 = C0559.f2825;
                if (l2 != null) {
                    if (l2 == null) {
                        C6635.m9822();
                        throw null;
                    }
                    C4303.m7160(C1356.f4507, C1340.f4488, null, new Ⴧ(l2.longValue(), i2, (InterfaceC6575) null), 2, null);
                }
            } else {
                if (l == null) {
                    C6635.m9822();
                    throw null;
                }
                C4303.m7160(C1356.f4507, C1340.f4488, null, new ޗ(l.longValue(), i2, (InterfaceC6575) null), 2, null);
            }
        }
        return true;
    }
}
