导航菜单

页面标题

页面副标题

Uptodown App Store v6.80 - PreferencesActivity.java 源代码

正在查看: Uptodown App Store v6.80 应用的 PreferencesActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.uptodown.activities.preferences;

import N1.e;
import N1.i;
import N1.k;
import R2.g;
import R2.h;
import R2.s;
import S2.H;
import W1.E;
import W1.t;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.core.content.ContextCompat;
import c2.C0588j0;
import c2.C0594m0;
import c2.C0614x;
import c2.E0;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import com.uptodown.UptodownApp;
import com.uptodown.activities.AbstractC0740a;
import com.uptodown.activities.GdprPrivacySettings;
import com.uptodown.activities.LanguageSettingsActivity;
import com.uptodown.activities.preferences.PreferencesActivity;
import com.uptodown.activities.preferences.a;
import com.uptodown.tv.preferences.TvPrivacyPreferences;
import d3.l;
import g2.C0964o;
import g2.N;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import kotlin.jvm.internal.A;
import kotlin.jvm.internal.AbstractC1009g;
import kotlin.jvm.internal.m;
import u2.F;
import u2.p;
import u2.y;
import y2.n;

public final class PreferencesActivity extends AbstractC0740a {
    public static final a O = new a(null);
    private final g J = h.a(new d3.a() {
        @Override
        public final Object invoke() {
            C0594m0 R3;
            R3 = PreferencesActivity.R3(PreferencesActivity.this);
            return R3;
        }
    });
    private final P1.a K = new P1.a(this);
    private N L;
    private final ActivityResultLauncher M;
    private final ActivityResultLauncher N;

    public static final class a {
        public a(AbstractC1009g abstractC1009g) {
            this();
        }

        private a() {
        }
    }

    public PreferencesActivity() {
        ActivityResultLauncher registerForActivityResult = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
            public final void onActivityResult(Object obj) {
                PreferencesActivity.a4(PreferencesActivity.this, (ActivityResult) obj);
            }
        });
        m.d(registerForActivityResult, "registerForActivityResult(...)");
        this.M = registerForActivityResult;
        ActivityResultLauncher registerForActivityResult2 = registerForActivityResult(new ActivityResultContracts.RequestPermission(), new ActivityResultCallback() {
            public final void onActivityResult(Object obj) {
                PreferencesActivity.N4(PreferencesActivity.this, ((Boolean) obj).booleanValue());
            }
        });
        m.d(registerForActivityResult2, "registerForActivityResult(...)");
        this.N = registerForActivityResult2;
    }

    public static final void A4(PreferencesActivity preferencesActivity, View view) {
        Intent intent = new Intent((Context) preferencesActivity, (Class<?>) AdvancedPreferencesActivity.class);
        intent.putExtra("advanced_settings_title", preferencesActivity.getString(2131952691));
        intent.putExtra("advanced_settings_index", 0);
        preferencesActivity.startActivity(intent, UptodownApp.F.a(preferencesActivity));
    }

    public static final void B4(PreferencesActivity preferencesActivity, View view) {
        Intent intent = new Intent((Context) preferencesActivity, (Class<?>) AdvancedPreferencesActivity.class);
        intent.putExtra("advanced_settings_title", preferencesActivity.getString(2131952039));
        intent.putExtra("advanced_settings_index", 1);
        preferencesActivity.startActivity(intent, UptodownApp.F.a(preferencesActivity));
    }

    public static final void C4(PreferencesActivity preferencesActivity, View view) {
        String string = preferencesActivity.getString(2131952519);
        m.d(string, "getString(...)");
        String string2 = preferencesActivity.getString(2131952784);
        m.d(string2, "getString(...)");
        new p().p(preferencesActivity, string2, string);
    }

    public static final void D4(PreferencesActivity preferencesActivity, View view) {
        Intent intent = new Intent((Context) preferencesActivity, (Class<?>) AdvancedPreferencesActivity.class);
        intent.putExtra("advanced_settings_title", preferencesActivity.getString(2131951643));
        intent.putExtra("advanced_settings_index", 2);
        preferencesActivity.startActivity(intent, UptodownApp.F.a(preferencesActivity));
    }

    public static final void E4(PreferencesActivity preferencesActivity, View view) {
        Intent intent = new Intent((Context) preferencesActivity, (Class<?>) AdvancedPreferencesActivity.class);
        intent.putExtra("advanced_settings_title", preferencesActivity.getString(2131951645));
        intent.putExtra("advanced_settings_index", 4);
        preferencesActivity.startActivity(intent, UptodownApp.F.a(preferencesActivity));
    }

    public static final void F4(final PreferencesActivity preferencesActivity, HashMap hashMap, View view) {
        if (preferencesActivity.W3().F.c.isChecked()) {
            String string = preferencesActivity.getString(2131951962);
            m.d(string, "getString(...)");
            preferencesActivity.S3(string, hashMap, Integer.parseInt(com.uptodown.activities.preferences.a.a.j(preferencesActivity)), new l() {
                @Override
                public final Object invoke(Object obj) {
                    R2.s G4;
                    G4 = PreferencesActivity.G4(PreferencesActivity.this, ((Integer) obj).intValue());
                    return G4;
                }
            });
        }
    }

    public static final s G4(PreferencesActivity preferencesActivity, int i) {
        com.uptodown.activities.preferences.a.a.x0(preferencesActivity, String.valueOf(i));
        preferencesActivity.W3().F.d.setText(preferencesActivity.X3());
        return s.a;
    }

    public static final void H4(PreferencesActivity preferencesActivity, CompoundButton compoundButton, boolean z) {
        if (z) {
            n nVar = new n(preferencesActivity);
            RelativeLayout root = preferencesActivity.W3().F.getRoot();
            m.d(root, "getRoot(...)");
            nVar.d(root, 1.0f);
            n nVar2 = new n(preferencesActivity);
            RelativeLayout root2 = preferencesActivity.W3().E.getRoot();
            m.d(root2, "getRoot(...)");
            nVar2.d(root2, 1.0f);
            com.uptodown.activities.preferences.a.a.x0(preferencesActivity, MBridgeConstans.API_REUQEST_CATEGORY_APP);
            preferencesActivity.W3().F.d.setText(preferencesActivity.X3());
            return;
        }
        n nVar3 = new n(preferencesActivity);
        RelativeLayout root3 = preferencesActivity.W3().F.getRoot();
        m.d(root3, "getRoot(...)");
        nVar3.d(root3, 0.3f);
        n nVar4 = new n(preferencesActivity);
        RelativeLayout root4 = preferencesActivity.W3().E.getRoot();
        m.d(root4, "getRoot(...)");
        nVar4.d(root4, 0.3f);
        com.uptodown.activities.preferences.a.a.x0(preferencesActivity, "0");
        preferencesActivity.W3().F.d.setText(preferencesActivity.getString(2131952514));
    }

    public static final void I4(PreferencesActivity preferencesActivity, View view) {
        preferencesActivity.W3().m.c.performClick();
    }

    public static final void J4(PreferencesActivity preferencesActivity, CompoundButton compoundButton, boolean z) {
        new P1.a(preferencesActivity).G(z);
    }

    public static final void K4(PreferencesActivity preferencesActivity, View view) {
        preferencesActivity.W3().f.c.performClick();
    }

    private final void L4() {
        Intent intent = new Intent();
        intent.setAction("android.settings.APP_NOTIFICATION_SETTINGS");
        intent.putExtra("android.provider.extra.APP_PACKAGE", getPackageName());
        if (intent.resolveActivity(getPackageManager()) != null) {
            startActivityForResult(intent, 646);
        }
    }

    private final void M4() {
        if (Build.VERSION.SDK_INT >= 33) {
            this.N.launch("android.permission.POST_NOTIFICATIONS");
        } else {
            com.uptodown.activities.preferences.a.a.S0(this, true);
            O4();
        }
    }

    public static final void N4(PreferencesActivity preferencesActivity, boolean z) {
        if (z) {
            com.uptodown.activities.preferences.a.a.S0(preferencesActivity, true);
            preferencesActivity.O4();
            return;
        }
        preferencesActivity.W3().z.c.setChecked(false);
        preferencesActivity.Z3();
        a.C0191a c0191a = com.uptodown.activities.preferences.a.a;
        int y = c0191a.y(preferencesActivity) + 1;
        c0191a.R0(preferencesActivity, y);
        if (Build.VERSION.SDK_INT < 33 || y < 2 || F.a.u(preferencesActivity)) {
            return;
        }
        preferencesActivity.P4();
    }

    private final void O4() {
        W3().z.d.setText(getString(2131951995));
        if (m.a(com.uptodown.activities.preferences.a.a.j(this), "0")) {
            n nVar = new n(this);
            RelativeLayout root = W3().E.getRoot();
            m.d(root, "getRoot(...)");
            nVar.d(root, 0.3f);
        } else {
            n nVar2 = new n(this);
            RelativeLayout root2 = W3().E.getRoot();
            m.d(root2, "getRoot(...)");
            nVar2.d(root2, 1.0f);
        }
        n nVar3 = new n(this);
        RelativeLayout root3 = W3().j.getRoot();
        m.d(root3, "getRoot(...)");
        nVar3.d(root3, 1.0f);
        W3().j.c.setClickable(true);
        n nVar4 = new n(this);
        RelativeLayout root4 = W3().n.getRoot();
        m.d(root4, "getRoot(...)");
        nVar4.d(root4, 1.0f);
        W3().n.c.setClickable(true);
        n nVar5 = new n(this);
        RelativeLayout root5 = W3().m.getRoot();
        m.d(root5, "getRoot(...)");
        nVar5.d(root5, 1.0f);
        W3().m.c.setClickable(true);
    }

    private final void P4() {
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setTitle(2131952682);
        builder.setMessage(2131951905);
        builder.setPositiveButton(2131951742, new DialogInterface.OnClickListener() {
            @Override
            public final void onClick(DialogInterface dialogInterface, int i) {
                PreferencesActivity.Q4(PreferencesActivity.this, dialogInterface, i);
            }
        });
        builder.create().show();
    }

    public static final void Q4(PreferencesActivity preferencesActivity, DialogInterface dialogInterface, int i) {
        preferencesActivity.L4();
        dialogInterface.dismiss();
    }

    public static final C0594m0 R3(PreferencesActivity preferencesActivity) {
        return C0594m0.c(preferencesActivity.getLayoutInflater());
    }

    private final void S3(String str, HashMap hashMap, int i, final l lVar) {
        if (isFinishing()) {
            return;
        }
        AlertDialog k22 = k2();
        if (k22 != null) {
            k22.dismiss();
        }
        AlertDialog.Builder builder = new AlertDialog.Builder(this);
        C0614x c = C0614x.c(getLayoutInflater());
        m.d(c, "inflate(...)");
        final A a4 = new A();
        a4.a = i;
        c.d.setTypeface(k.g.w());
        c.d.setText(str);
        for (final Map.Entry entry : hashMap.entrySet()) {
            E0 c4 = E0.c(getLayoutInflater());
            m.d(c4, "inflate(...)");
            c4.getRoot().setId(((Number) entry.getKey()).intValue());
            c4.b.setTypeface(k.g.x());
            c4.b.setText((CharSequence) entry.getValue());
            c4.getRoot().setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    PreferencesActivity.T3(kotlin.jvm.internal.A.this, entry, view);
                }
            });
            if (((Number) entry.getKey()).intValue() == i) {
                c4.b.setChecked(true);
            }
            c.b.addView(c4.getRoot());
        }
        c.c.setTypeface(k.g.w());
        c.c.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.U3(d3.l.this, a4, this, view);
            }
        });
        builder.setView(c.getRoot());
        K2(builder.create());
        if (isFinishing() || k2() == null) {
            return;
        }
        AlertDialog k23 = k2();
        m.b(k23);
        k23.setCancelable(true);
        X2();
    }

    public static final void T3(A a4, Map.Entry entry, View view) {
        a4.a = ((Number) entry.getKey()).intValue();
    }

    public static final void U3(l lVar, A a4, PreferencesActivity preferencesActivity, View view) {
        lVar.invoke(Integer.valueOf(a4.a));
        preferencesActivity.j2();
    }

    private final String V3() {
        int c = com.uptodown.activities.preferences.a.a.c(this);
        if (c == -1) {
            String string = getString(2131952608);
            m.d(string, "getString(...)");
            return string;
        }
        if (c == 0) {
            String string2 = getString(2131952609);
            m.d(string2, "getString(...)");
            return string2;
        }
        if (c != 1) {
            return TtmlNode.ANONYMOUS_REGION_ID;
        }
        String string3 = getString(2131952610);
        m.d(string3, "getString(...)");
        return string3;
    }

    private final C0594m0 W3() {
        return (C0594m0) this.J.getValue();
    }

    private final String X3() {
        String string;
        a.C0191a c0191a = com.uptodown.activities.preferences.a.a;
        String j = c0191a.j(this);
        switch (j.hashCode()) {
            case 48:
                if (j.equals("0")) {
                    string = getString(2131952514);
                    break;
                }
                c0191a.x0(this, MBridgeConstans.API_REUQEST_CATEGORY_APP);
                string = getString(2131952501);
                break;
            case 49:
                if (j.equals("1")) {
                    string = getString(2131952509);
                    break;
                }
                c0191a.x0(this, MBridgeConstans.API_REUQEST_CATEGORY_APP);
                string = getString(2131952501);
                break;
            case 50:
                if (j.equals(MBridgeConstans.API_REUQEST_CATEGORY_APP)) {
                    string = getString(2131952501);
                    break;
                }
                c0191a.x0(this, MBridgeConstans.API_REUQEST_CATEGORY_APP);
                string = getString(2131952501);
                break;
            default:
                c0191a.x0(this, MBridgeConstans.API_REUQEST_CATEGORY_APP);
                string = getString(2131952501);
                break;
        }
        File externalFilesDir = getExternalFilesDir(null);
        Long valueOf = externalFilesDir != null ? Long.valueOf(externalFilesDir.getUsableSpace()) : null;
        if (valueOf == null) {
            return string + "\n⚠ " + getString(2131951999);
        }
        if (valueOf.longValue() >= 262144000) {
            return string;
        }
        return string + "\n⚠ " + getString(i.H);
    }

    private final String Y3() {
        int parseInt = Integer.parseInt(com.uptodown.activities.preferences.a.a.w(this));
        return parseInt != 1 ? parseInt != 2 ? parseInt != 3 ? parseInt != 4 ? TtmlNode.ANONYMOUS_REGION_ID : getString(2131952775) : getString(2131952776) : getString(2131952774) : getString(2131952773);
    }

    private final void Z3() {
        W3().z.d.setText(getString(2131951942));
        n nVar = new n(this);
        RelativeLayout root = W3().E.getRoot();
        m.d(root, "getRoot(...)");
        nVar.d(root, 0.3f);
        n nVar2 = new n(this);
        RelativeLayout root2 = W3().j.getRoot();
        m.d(root2, "getRoot(...)");
        nVar2.d(root2, 0.3f);
        W3().j.c.setClickable(false);
        n nVar3 = new n(this);
        RelativeLayout root3 = W3().n.getRoot();
        m.d(root3, "getRoot(...)");
        nVar3.d(root3, 0.3f);
        W3().n.c.setClickable(false);
        n nVar4 = new n(this);
        RelativeLayout root4 = W3().m.getRoot();
        m.d(root4, "getRoot(...)");
        nVar4.d(root4, 0.3f);
        W3().m.c.setClickable(false);
    }

    public static final void a4(PreferencesActivity preferencesActivity, ActivityResult activityResult) {
        if (activityResult.getResultCode() == 1003) {
            preferencesActivity.setResult(1003);
            preferencesActivity.finish();
            preferencesActivity.startActivity(preferencesActivity.getIntent());
        }
    }

    public static final void b4(PreferencesActivity preferencesActivity, CompoundButton compoundButton, boolean z) {
        com.uptodown.activities.preferences.a.a.m0(preferencesActivity, z);
    }

    public static final void c4(final PreferencesActivity preferencesActivity, HashMap hashMap, View view) {
        String string = preferencesActivity.getString(2131952611);
        m.d(string, "getString(...)");
        preferencesActivity.S3(string, hashMap, com.uptodown.activities.preferences.a.a.c(preferencesActivity), new l() {
            @Override
            public final Object invoke(Object obj) {
                R2.s d4;
                d4 = PreferencesActivity.d4(PreferencesActivity.this, ((Integer) obj).intValue());
                return d4;
            }
        });
    }

    public static final s d4(PreferencesActivity preferencesActivity, int i) {
        com.uptodown.activities.preferences.a.a.o0(preferencesActivity, String.valueOf(i));
        preferencesActivity.W3().g.c.setText(preferencesActivity.V3());
        return s.a;
    }

    public static final void e4(final PreferencesActivity preferencesActivity, HashMap hashMap, View view) {
        String string = preferencesActivity.getString(2131951889);
        m.d(string, "getString(...)");
        preferencesActivity.S3(string, hashMap, com.uptodown.activities.preferences.a.a.g(preferencesActivity), new l() {
            @Override
            public final Object invoke(Object obj) {
                R2.s f4;
                f4 = PreferencesActivity.f4(PreferencesActivity.this, ((Integer) obj).intValue());
                return f4;
            }
        });
    }

    public static final s f4(PreferencesActivity preferencesActivity, int i) {
        a.C0191a c0191a = com.uptodown.activities.preferences.a.a;
        if (c0191a.g(preferencesActivity) != i) {
            c0191a.s0(preferencesActivity, String.valueOf(i));
            preferencesActivity.setResult(1004);
        }
        return s.a;
    }

    public static final void g4(PreferencesActivity preferencesActivity, View view) {
        preferencesActivity.W3().s.c.performClick();
    }

    public static final void h4(PreferencesActivity preferencesActivity, CompoundButton compoundButton, boolean z) {
        com.uptodown.activities.preferences.a.a.U0(preferencesActivity, z);
    }

    public static final void i4(PreferencesActivity preferencesActivity, View view) {
        preferencesActivity.W3().h.c.performClick();
    }

    public static final void j4(PreferencesActivity preferencesActivity, CompoundButton compoundButton, boolean z) {
        com.uptodown.activities.preferences.a.a.D0(preferencesActivity, z);
        if (z) {
            try {
                t.a.d();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    public static final void k4(PreferencesActivity preferencesActivity, View view) {
        preferencesActivity.W3().w.c.performClick();
    }

    public static final void l4(PreferencesActivity preferencesActivity, View view) {
        preferencesActivity.finish();
    }

    public static final void m4(PreferencesActivity preferencesActivity, CompoundButton compoundButton, boolean z) {
        com.uptodown.activities.preferences.a.a.V0(preferencesActivity, z);
        if (z) {
            preferencesActivity.K.M(true);
        }
    }

    public static final void n4(PreferencesActivity preferencesActivity, View view) {
        preferencesActivity.W3().z.c.performClick();
    }

    public static final void o4(PreferencesActivity preferencesActivity, CompoundButton compoundButton, boolean z) {
        if (z) {
            preferencesActivity.O4();
            preferencesActivity.M4();
        } else {
            preferencesActivity.Z3();
            com.uptodown.activities.preferences.a.a.S0(preferencesActivity, false);
        }
    }

    public static final void p4(final PreferencesActivity preferencesActivity, HashMap hashMap, View view) {
        String string = preferencesActivity.getString(2131952766);
        m.d(string, "getString(...)");
        preferencesActivity.S3(string, hashMap, Integer.parseInt(com.uptodown.activities.preferences.a.a.w(preferencesActivity)), new l() {
            @Override
            public final Object invoke(Object obj) {
                R2.s q4;
                q4 = PreferencesActivity.q4(PreferencesActivity.this, ((Integer) obj).intValue());
                return q4;
            }
        });
    }

    public static final s q4(PreferencesActivity preferencesActivity, int i) {
        com.uptodown.activities.preferences.a.a.Q0(preferencesActivity, String.valueOf(i));
        preferencesActivity.W3().E.c.setText(preferencesActivity.Y3());
        return s.a;
    }

    public static final void r4(PreferencesActivity preferencesActivity, View view) {
        preferencesActivity.W3().j.c.performClick();
    }

    public static final void s4(PreferencesActivity preferencesActivity, CompoundButton compoundButton, boolean z) {
        com.uptodown.activities.preferences.a.a.w0(preferencesActivity, z);
    }

    public static final void t4(PreferencesActivity preferencesActivity, View view) {
        preferencesActivity.W3().n.c.performClick();
    }

    public static final void u4(PreferencesActivity preferencesActivity, CompoundButton compoundButton, boolean z) {
        com.uptodown.activities.preferences.a.a.E0(preferencesActivity, z);
    }

    public static final void v4(PreferencesActivity preferencesActivity, View view) {
        preferencesActivity.M.launch(new Intent((Context) preferencesActivity, (Class<?>) LanguageSettingsActivity.class), UptodownApp.F.b(preferencesActivity));
    }

    public static final void w4(final PreferencesActivity preferencesActivity, HashMap hashMap, A a4, final C0588j0 c0588j0, View view) {
        String string = preferencesActivity.getString(2131952602);
        m.d(string, "getString(...)");
        preferencesActivity.S3(string, hashMap, a4.a, new l() {
            @Override
            public final Object invoke(Object obj) {
                R2.s x4;
                x4 = PreferencesActivity.x4(PreferencesActivity.this, c0588j0, ((Integer) obj).intValue());
                return x4;
            }
        });
    }

    public static final s x4(PreferencesActivity preferencesActivity, C0588j0 c0588j0, int i) {
        com.uptodown.activities.preferences.a.a.W0(preferencesActivity, i != 0);
        if (i == 0) {
            c0588j0.c.setText(preferencesActivity.getString(i.U));
        } else {
            c0588j0.c.setText(preferencesActivity.getString(i.f152m0));
        }
        return s.a;
    }

    public static final void y4(PreferencesActivity preferencesActivity, View view) {
        UptodownApp.a aVar = UptodownApp.F;
        if (aVar.S(preferencesActivity)) {
            preferencesActivity.startActivity(new Intent((Context) preferencesActivity, (Class<?>) TvPrivacyPreferences.class));
        } else {
            preferencesActivity.startActivity(new Intent((Context) preferencesActivity, (Class<?>) GdprPrivacySettings.class), aVar.a(preferencesActivity));
        }
    }

    public static final void z4(PreferencesActivity preferencesActivity, View view) {
        Intent intent = new Intent((Context) preferencesActivity, (Class<?>) AdvancedPreferencesActivity.class);
        intent.putExtra("advanced_settings_title", preferencesActivity.getString(2131951662));
        intent.putExtra("advanced_settings_index", 3);
        preferencesActivity.startActivity(intent, UptodownApp.F.a(preferencesActivity));
    }

    public void finish() {
        N n = new N(this);
        if (!n.b(this.L)) {
            C0964o c0964o = new C0964o();
            c0964o.j(this);
            n.j(this, c0964o);
        }
        super/*android.app.Activity*/.finish();
    }

    @Override
    protected void onCreate(Bundle bundle) {
        String str;
        super.onCreate(bundle);
        setContentView(W3().getRoot());
        this.L = new N(this);
        Drawable drawable = ContextCompat.getDrawable(this, e.c);
        if (drawable != null) {
            W3().A.setNavigationIcon(drawable);
            W3().A.setNavigationContentDescription(getString(2131951721));
        }
        W3().A.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.l4(PreferencesActivity.this, view);
            }
        });
        TextView textView = W3().C;
        k.a aVar = k.g;
        textView.setTypeface(aVar.w());
        W3().o.e.setTypeface(aVar.w());
        W3().o.e.setText(getString(2131952103));
        W3().o.d.setTypeface(aVar.x());
        W3().o.d.setVisibility(0);
        String l = com.uptodown.activities.preferences.a.a.l(this);
        String[] stringArray = getResources().getStringArray(2130903040);
        m.d(stringArray, "getStringArray(...)");
        String[] stringArray2 = getResources().getStringArray(2130903042);
        m.d(stringArray2, "getStringArray(...)");
        int length = stringArray.length;
        int i = 0;
        while (true) {
            if (i >= length) {
                str = TtmlNode.ANONYMOUS_REGION_ID;
                break;
            } else {
                if (stringArray[i].equals(l)) {
                    str = stringArray2[i];
                    break;
                }
                i++;
            }
        }
        W3().o.d.setText(str);
        W3().o.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.v4(PreferencesActivity.this, view);
            }
        });
        TextView textView2 = W3().D.b;
        k.a aVar2 = k.g;
        textView2.setTypeface(aVar2.w());
        W3().D.b.setText(getString(2131952766));
        W3().F.e.setTypeface(aVar2.w());
        W3().F.e.setText(getString(2131952766));
        W3().F.d.setTypeface(aVar2.x());
        W3().F.d.setText(X3());
        final HashMap i4 = H.i(R2.p.a(Integer.valueOf(Integer.parseInt("1")), getString(2131952509)), R2.p.a(Integer.valueOf(Integer.parseInt(MBridgeConstans.API_REUQEST_CATEGORY_APP)), getString(2131952501)));
        W3().F.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.F4(PreferencesActivity.this, i4, view);
            }
        });
        a.C0191a c0191a = com.uptodown.activities.preferences.a.a;
        if (m.a(c0191a.j(this), "0")) {
            n nVar = new n(this);
            RelativeLayout root = W3().F.getRoot();
            m.d(root, "getRoot(...)");
            nVar.d(root, 0.3f);
            n nVar2 = new n(this);
            RelativeLayout root2 = W3().E.getRoot();
            m.d(root2, "getRoot(...)");
            nVar2.d(root2, 0.3f);
            W3().F.c.setChecked(false);
        } else {
            n nVar3 = new n(this);
            RelativeLayout root3 = W3().F.getRoot();
            m.d(root3, "getRoot(...)");
            nVar3.d(root3, 1.0f);
            n nVar4 = new n(this);
            RelativeLayout root4 = W3().E.getRoot();
            m.d(root4, "getRoot(...)");
            nVar4.d(root4, 1.0f);
            W3().F.c.setChecked(true);
        }
        W3().F.c.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                PreferencesActivity.H4(PreferencesActivity.this, compoundButton, z);
            }
        });
        W3().l.b.setTypeface(aVar2.w());
        W3().l.b.setText(getString(2131952506));
        W3().m.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.I4(PreferencesActivity.this, view);
            }
        });
        W3().m.e.setTypeface(aVar2.w());
        W3().m.e.setText(getString(2131952594));
        W3().m.d.setTypeface(aVar2.x());
        W3().m.d.setText(getString(2131952507));
        W3().m.c.setChecked(new P1.a(this).p());
        W3().m.c.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                PreferencesActivity.J4(PreferencesActivity.this, compoundButton, z);
            }
        });
        W3().t.b.setTypeface(aVar2.w());
        W3().t.b.setText(getString(2131952510));
        W3().f.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.K4(PreferencesActivity.this, view);
            }
        });
        W3().f.e.setTypeface(aVar2.w());
        W3().f.e.setText(getString(2131952512));
        W3().f.d.setVisibility(8);
        W3().f.c.setChecked(c0191a.K(this));
        W3().f.c.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                PreferencesActivity.b4(PreferencesActivity.this, compoundButton, z);
            }
        });
        if (UptodownApp.F.Q()) {
            W3().f.getRoot().setVisibility(8);
        }
        W3().g.d.setTypeface(aVar2.w());
        W3().g.d.setText(getString(2131952611));
        W3().g.c.setTypeface(aVar2.x());
        W3().g.c.setText(V3());
        final HashMap i5 = H.i(R2.p.a(-1, getString(2131952608)), R2.p.a(0, getString(2131952609)), R2.p.a(1, getString(2131952610)));
        W3().g.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.c4(PreferencesActivity.this, i5, view);
            }
        });
        W3().i.d.setTypeface(aVar2.w());
        W3().i.d.setText(getString(2131951891));
        W3().i.c.setTypeface(aVar2.x());
        W3().i.c.setText(getString(2131951890));
        final HashMap i6 = H.i(R2.p.a(0, getString(2131951888)), R2.p.a(1, getString(2131951886)), R2.p.a(2, getString(2131951887)));
        W3().i.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.e4(PreferencesActivity.this, i6, view);
            }
        });
        W3().s.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.g4(PreferencesActivity.this, view);
            }
        });
        W3().s.e.setTypeface(aVar2.w());
        W3().s.e.setText(getString(2131952646));
        W3().s.d.setTypeface(aVar2.x());
        W3().s.d.setText(getString(2131952647));
        W3().s.c.setChecked(c0191a.V(this));
        W3().s.c.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                PreferencesActivity.h4(PreferencesActivity.this, compoundButton, z);
            }
        });
        if (this.K.s() || t.a.d()) {
            W3().y.b.setTypeface(aVar2.w());
            W3().y.b.setText(getString(2131952502));
            W3().h.getRoot().setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    PreferencesActivity.i4(PreferencesActivity.this, view);
                }
            });
            W3().h.e.setTypeface(aVar2.w());
            W3().h.e.setText(getString(2131952501));
            W3().h.d.setTypeface(aVar2.x());
            W3().h.d.setText(getString(2131952500));
            W3().h.c.setChecked(c0191a.S(this));
            W3().h.c.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
                @Override
                public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                    PreferencesActivity.j4(PreferencesActivity.this, compoundButton, z);
                }
            });
            W3().w.getRoot().setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    PreferencesActivity.k4(PreferencesActivity.this, view);
                }
            });
            W3().w.e.setTypeface(aVar2.w());
            W3().w.e.setText(getString(2131952504));
            W3().w.d.setTypeface(aVar2.x());
            W3().w.d.setText(getString(2131952503));
            W3().w.c.setChecked(c0191a.W(this));
            W3().w.c.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
                @Override
                public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                    PreferencesActivity.m4(PreferencesActivity.this, compoundButton, z);
                }
            });
        } else {
            W3().y.b.setVisibility(8);
            W3().h.getRoot().setVisibility(8);
            W3().w.getRoot().setVisibility(8);
        }
        W3().r.b.setTypeface(aVar2.w());
        W3().r.b.setText(getString(2131952544));
        W3().z.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.n4(PreferencesActivity.this, view);
            }
        });
        W3().z.e.setTypeface(aVar2.w());
        W3().z.e.setText(getString(2131952508));
        W3().z.d.setTypeface(aVar2.x());
        if (c0191a.U(this)) {
            W3().z.d.setText(getString(2131951995));
        } else {
            W3().z.d.setText(getString(2131951942));
        }
        W3().z.c.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                PreferencesActivity.o4(PreferencesActivity.this, compoundButton, z);
            }
        });
        W3().E.d.setTypeface(aVar2.w());
        W3().E.d.setText(getString(2131952766));
        W3().E.c.setTypeface(aVar2.x());
        W3().E.c.setText(Y3());
        final HashMap i7 = H.i(R2.p.a(1, getString(2131951672)), R2.p.a(2, getString(2131951673)), R2.p.a(3, getString(2131951679)), R2.p.a(4, getString(2131951675)));
        W3().E.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.p4(PreferencesActivity.this, i7, view);
            }
        });
        W3().j.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.r4(PreferencesActivity.this, view);
            }
        });
        W3().j.e.setTypeface(aVar2.w());
        W3().j.e.setText(getString(2131951969));
        W3().j.d.setTypeface(aVar2.x());
        W3().j.d.setText(getString(2131951968));
        W3().j.c.setChecked(c0191a.N(this));
        W3().j.c.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                PreferencesActivity.s4(PreferencesActivity.this, compoundButton, z);
            }
        });
        W3().n.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.t4(PreferencesActivity.this, view);
            }
        });
        W3().n.e.setTypeface(aVar2.w());
        W3().n.e.setText(getString(2131952093));
        W3().n.d.setTypeface(aVar2.x());
        W3().n.d.setText(getString(2131952096));
        W3().n.c.setChecked(c0191a.T(this));
        W3().n.c.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                PreferencesActivity.u4(PreferencesActivity.this, compoundButton, z);
            }
        });
        if (F.a.a(this)) {
            O4();
            W3().z.c.setChecked(true);
        } else {
            Z3();
            W3().z.c.setChecked(false);
        }
        final A a4 = new A();
        String string = getString(i.U);
        m.d(string, "getString(...)");
        if (!c0191a.Y(this)) {
            string = getString(i.U);
            a4.a = 0;
        } else if (c0191a.X(this)) {
            string = getString(i.f152m0);
            a4.a = 1;
        }
        HashMap hashMap = new HashMap();
        hashMap.put(0, getString(2131952098, new W1.i().d(new y().e(this).getFreeSpace(), this)));
        ArrayList c = new E().c(this);
        if (!c.isEmpty()) {
            hashMap.put(1, getString(2131952590, new W1.i().d(((T1.g) c.get(0)).a(), this)));
        }
        if (hashMap.size() > 1) {
            final HashMap hashMap2 = new HashMap();
            for (Map.Entry entry : hashMap.entrySet()) {
                hashMap2.put(entry.getKey(), entry.getValue());
            }
            final C0588j0 c4 = C0588j0.c(getLayoutInflater());
            m.d(c4, "inflate(...)");
            c4.d.setTypeface(k.g.w());
            c4.d.setText(getString(2131951961));
            c4.c.setText(string);
            c4.getRoot().setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    PreferencesActivity.w4(PreferencesActivity.this, hashMap2, a4, c4, view);
                }
            });
            W3().p.addView(c4.getRoot(), W3().p.indexOfChild(W3().m.getRoot()));
        }
        TextView textView3 = W3().u.b;
        k.a aVar3 = k.g;
        textView3.setTypeface(aVar3.w());
        W3().u.b.setText(getString(2131952511));
        W3().v.e.setTypeface(aVar3.w());
        W3().v.e.setText(getString(2131952054));
        W3().v.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.y4(PreferencesActivity.this, view);
            }
        });
        if (!com.uptodown.activities.preferences.a.a.Q(this)) {
            W3().v.getRoot().setVisibility(8);
        }
        W3().e.e.setTypeface(aVar3.w());
        W3().e.e.setText(getString(2131951662));
        W3().e.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.z4(PreferencesActivity.this, view);
            }
        });
        W3().q.b.setTypeface(aVar3.w());
        W3().q.b.setText(getString(2131951685));
        W3().B.e.setTypeface(aVar3.w());
        W3().B.e.setText(getString(2131952513));
        W3().B.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.A4(PreferencesActivity.this, view);
            }
        });
        W3().k.e.setTypeface(aVar3.w());
        W3().k.e.setText(getString(2131952039));
        W3().k.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.B4(PreferencesActivity.this, view);
            }
        });
        W3().d.e.setTypeface(aVar3.w());
        W3().d.e.setText(getString(2131951663));
        W3().d.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.C4(PreferencesActivity.this, view);
            }
        });
        W3().b.e.setTypeface(aVar3.w());
        W3().b.e.setText(getString(2131951643));
        W3().b.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.D4(PreferencesActivity.this, view);
            }
        });
        W3().c.e.setTypeface(aVar3.w());
        W3().c.e.setText(getString(2131951645));
        W3().c.getRoot().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PreferencesActivity.E4(PreferencesActivity.this, view);
            }
        });
    }
}