导航菜单

页面标题

页面副标题

Fancy Optimizer v4.6.3 - DeveloperActivity.java 源代码

正在查看: Fancy Optimizer v4.6.3 应用的 DeveloperActivity.java JAVA 源代码文件

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


package com.fancyclean.boost.main.ui.activity.developer;

import android.app.Dialog;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Process;
import android.text.TextUtils;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.NumberPicker;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import com.fancyclean.boost.main.ui.activity.developer.DeveloperActivity;
import com.rengwuxian.materialedittext.MaterialEditText;
import com.thinkyeah.common.ui.dialog.c;
import com.thinkyeah.common.ui.thinklist.a;
import com.thinkyeah.common.ui.view.TitleBar;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Locale;
import jl.f;
import t4.g;
import vj.h;

public class DeveloperActivity extends v7.a<hl.b> {
    public static final int n = 0;
    public final androidx.core.view.inputmethod.b l = new androidx.core.view.inputmethod.b(this, 21);
    public final a m = new a();

    public class a implements a.c {
        public a() {
        }

        public final boolean a(int i, boolean z10) {
            if (i != 102 || z10) {
                return true;
            }
            new c().show(DeveloperActivity.this.getSupportFragmentManager(), "UseFakeRegionDialogFragment");
            return false;
        }

        public final void b(int i, boolean z10) {
            SharedPreferences.Editor edit;
            ?? r32 = DeveloperActivity.this;
            if (i == 8) {
                SharedPreferences sharedPreferences = r32.getSharedPreferences("app_remote_config", 0);
                SharedPreferences.Editor edit2 = sharedPreferences == null ? null : sharedPreferences.edit();
                if (edit2 != null) {
                    edit2.putBoolean("test_enabled", z10);
                    edit2.apply();
                }
                SharedPreferences sharedPreferences2 = r32.getSharedPreferences("app_remote_config", 0);
                edit = sharedPreferences2 != null ? sharedPreferences2.edit() : null;
                if (edit != null) {
                    edit.commit();
                }
                Process.killProcess(Process.myPid());
                return;
            }
            if (i == 9) {
                SharedPreferences sharedPreferences3 = r32.getSharedPreferences("app_remote_config", 0);
                SharedPreferences.Editor edit3 = sharedPreferences3 == null ? null : sharedPreferences3.edit();
                if (edit3 != null) {
                    edit3.putBoolean("force_refresh_enabled", z10);
                    edit3.apply();
                }
                SharedPreferences sharedPreferences4 = r32.getSharedPreferences("app_remote_config", 0);
                edit = sharedPreferences4 != null ? sharedPreferences4.edit() : null;
                if (edit != null) {
                    edit.commit();
                }
                Process.killProcess(Process.myPid());
                return;
            }
            if (i == 101) {
                SharedPreferences sharedPreferences5 = r32.getSharedPreferences("main", 0);
                edit = sharedPreferences5 != null ? sharedPreferences5.edit() : null;
                if (edit != null) {
                    edit.putBoolean("debug_enabled", z10);
                    edit.apply();
                }
                if (z10) {
                    h.j(1);
                    com.adtiny.core.a aVar = com.adtiny.core.d.b().c;
                    if (aVar != null) {
                        aVar.a();
                        return;
                    }
                    return;
                }
                h.j(6);
                com.adtiny.core.a aVar2 = com.adtiny.core.d.b().c;
                if (aVar2 != null) {
                    aVar2.g();
                    return;
                }
                return;
            }
            if (i == 102) {
                if (z10) {
                    return;
                }
                SharedPreferences sharedPreferences6 = r32.getSharedPreferences("main", 0);
                SharedPreferences.Editor edit4 = sharedPreferences6 == null ? null : sharedPreferences6.edit();
                if (edit4 != null) {
                    edit4.putString("fake_region", null);
                    edit4.apply();
                }
                r32.Y2();
                return;
            }
            if (i == 104) {
                SharedPreferences sharedPreferences7 = r32.getSharedPreferences("main", 0);
                edit = sharedPreferences7 != null ? sharedPreferences7.edit() : null;
                if (edit == null) {
                    return;
                }
                edit.putBoolean("use_staging_server", z10);
                edit.apply();
                return;
            }
            if (i == 202) {
                SharedPreferences sharedPreferences8 = r32.getSharedPreferences("main", 0);
                edit = sharedPreferences8 != null ? sharedPreferences8.edit() : null;
                if (edit == null) {
                    return;
                }
                edit.putBoolean("always_optimize_enabled", z10);
                edit.apply();
                return;
            }
            if (i == 208) {
                SharedPreferences sharedPreferences9 = r32.getSharedPreferences("main", 0);
                edit = sharedPreferences9 != null ? sharedPreferences9.edit() : null;
                if (edit == null) {
                    return;
                }
                edit.putBoolean("always_add_shortcut_enabled", z10);
                edit.apply();
                return;
            }
            if (i != 210) {
                return;
            }
            SharedPreferences sharedPreferences10 = r32.getSharedPreferences("main", 0);
            edit = sharedPreferences10 != null ? sharedPreferences10.edit() : null;
            if (edit == null) {
                return;
            }
            edit.putBoolean("is_toast_perform_sync_enabled", z10);
            edit.apply();
        }
    }

    public static class b extends com.thinkyeah.common.ui.dialog.c<DeveloperActivity> {
        public static final int c = 0;

        @NonNull
        public final Dialog onCreateDialog(Bundle bundle) {
            ArrayList arrayList = new ArrayList();
            arrayList.add(new c.b("Reset to Show Ads"));
            arrayList.add(new c.b("Set to Current"));
            c.a aVar = new c.a(getActivity());
            aVar.d = "Change Install Time";
            g gVar = new g(this, 7);
            aVar.v = arrayList;
            aVar.w = gVar;
            return aVar.a();
        }
    }

    public static class c extends com.thinkyeah.common.ui.dialog.c<DeveloperActivity> {
        public static final int d = 0;
        public MaterialEditText c;

        @NonNull
        public final Dialog onCreateDialog(Bundle bundle) {
            if (getContext() == null) {
                return d0();
            }
            MaterialEditText materialEditText = new MaterialEditText(getContext());
            this.c = materialEditText;
            materialEditText.setMetTextColor(ContextCompat.getColor(getContext(), 2131100564));
            this.c.setFloatingLabel(2);
            this.c.setHint("Country Code");
            this.c.setFloatingLabelText((CharSequence) null);
            this.c.setSingleLine(true);
            LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
            layoutParams.setMargins(getResources().getDimensionPixelSize(2131165961), getResources().getDimensionPixelSize(2131165962), getResources().getDimensionPixelSize(2131165961), getResources().getDimensionPixelSize(2131165962));
            this.c.setLayoutParams(layoutParams);
            c.a aVar = new c.a(getActivity());
            aVar.d = "Fake Region";
            aVar.x = this.c;
            aVar.e(2131887306, new DialogInterface.OnClickListener() {
                @Override
                public final void onClick(DialogInterface dialogInterface, int i) {
                    int i10 = DeveloperActivity.c.d;
                }
            });
            return aVar.a();
        }

        public final void onResume() {
            super/*androidx.fragment.app.Fragment*/.onResume();
            getDialog().getButton(-1).setOnClickListener(new t4.a(this, 19));
        }
    }

    public static class d extends com.thinkyeah.common.ui.dialog.c<DeveloperActivity> {
        public static final int c = 0;

        @NonNull
        public final Dialog onCreateDialog(Bundle bundle) {
            if (getActivity() == null || getArguments() == null) {
                return d0();
            }
            FrameLayout frameLayout = new FrameLayout(getActivity());
            NumberPicker numberPicker = new NumberPicker(getActivity());
            numberPicker.setMaxValue(99);
            numberPicker.setMinValue(0);
            numberPicker.setWrapSelectorWheel(false);
            numberPicker.setValue(getArguments().getInt("currentNumber"));
            FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-2, -2);
            layoutParams.gravity = 1;
            numberPicker.setLayoutParams(layoutParams);
            frameLayout.addView(numberPicker);
            c.a aVar = new c.a(getActivity());
            aVar.d = "User Random Number";
            aVar.x = frameLayout;
            aVar.d(2131886274, (DialogInterface.OnClickListener) null);
            aVar.e(2131887429, new c6.a(2, this, numberPicker));
            return aVar.a();
        }
    }

    public final void X2() {
        ArrayList arrayList = new ArrayList();
        SharedPreferences sharedPreferences = getSharedPreferences("main", 0);
        com.thinkyeah.common.ui.thinklist.a aVar = new com.thinkyeah.common.ui.thinklist.a("Always Do Optimize", this, sharedPreferences == null ? false : sharedPreferences.getBoolean("always_optimize_enabled", false), 202);
        a aVar2 = this.m;
        aVar.setToggleButtonClickListener(aVar2);
        arrayList.add(aVar);
        jl.d dVar = new jl.d(this, 207, "Enable NC Debug");
        SharedPreferences sharedPreferences2 = getSharedPreferences("notification_clean", 0);
        dVar.setValue(String.valueOf(sharedPreferences2 == null ? false : sharedPreferences2.getBoolean("nc_debug_enabled", false)));
        dVar.setThinkItemClickListener(this.l);
        arrayList.add(dVar);
        SharedPreferences sharedPreferences3 = getSharedPreferences("main", 0);
        com.thinkyeah.common.ui.thinklist.a aVar3 = new com.thinkyeah.common.ui.thinklist.a("Always Add Shortcut", this, sharedPreferences3 == null ? false : sharedPreferences3.getBoolean("always_add_shortcut_enabled", false), 208);
        aVar3.setToggleButtonClickListener(aVar2);
        arrayList.add(aVar3);
        h hVar = y7.a.a;
        SharedPreferences sharedPreferences4 = getSharedPreferences("main", 0);
        com.thinkyeah.common.ui.thinklist.a aVar4 = new com.thinkyeah.common.ui.thinklist.a("Toast when Account Sync", this, sharedPreferences4 != null ? sharedPreferences4.getBoolean("is_toast_perform_sync_enabled", false) : false, 210);
        aVar4.setToggleButtonClickListener(aVar2);
        arrayList.add(aVar4);
        findViewById(2131363206).setAdapter(new jl.b(arrayList));
    }

    public final void Y2() {
        ArrayList arrayList = new ArrayList();
        com.thinkyeah.common.ui.thinklist.a aVar = new com.thinkyeah.common.ui.thinklist.a("Enable Debug Log", this, com.google.ads.mediation.unity.b.y(this), 101);
        a aVar2 = this.m;
        aVar.setToggleButtonClickListener(aVar2);
        arrayList.add(aVar);
        com.thinkyeah.common.ui.thinklist.a aVar3 = new com.thinkyeah.common.ui.thinklist.a("Use Fake Region", this, !TextUtils.isEmpty(getSharedPreferences("main", 0) != null ? r5.getString("fake_region", null) : null), 102);
        aVar3.setComment(y7.a.a(this));
        aVar3.setToggleButtonClickListener(aVar2);
        arrayList.add(aVar3);
        jl.d dVar = new jl.d(this, 310, "License");
        androidx.core.view.inputmethod.b bVar = this.l;
        dVar.setThinkItemClickListener(bVar);
        arrayList.add(dVar);
        jl.d dVar2 = new jl.d(this, 103, "Clear Glide Cache");
        dVar2.setThinkItemClickListener(bVar);
        arrayList.add(dVar2);
        SharedPreferences sharedPreferences = getSharedPreferences("main", 0);
        com.thinkyeah.common.ui.thinklist.a aVar4 = new com.thinkyeah.common.ui.thinklist.a("Use Staging Server", this, sharedPreferences != null ? sharedPreferences.getBoolean("use_staging_server", false) : false, 104);
        aVar4.setToggleButtonClickListener(aVar2);
        arrayList.add(aVar4);
        jl.d dVar3 = new jl.d(this, 105, "Make a Crash");
        dVar3.setThinkItemClickListener(bVar);
        arrayList.add(dVar3);
        jl.d dVar4 = new jl.d(this, 106, "Permissions");
        dVar4.setThinkItemClickListener(bVar);
        arrayList.add(dVar4);
        jl.d dVar5 = new jl.d(this, 107, "Push Notifications");
        dVar5.setThinkItemClickListener(bVar);
        arrayList.add(dVar5);
        jl.d dVar6 = new jl.d(this, 108, "Ads");
        dVar6.setThinkItemClickListener(bVar);
        arrayList.add(dVar6);
        findViewById(2131363209).setAdapter(new jl.b(arrayList));
    }

    public final void Z2() {
        String o;
        ArrayList arrayList = new ArrayList();
        Locale locale = Locale.US;
        arrayList.add(new f(this, "Build Time", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", locale).format(new Date(1688566428848L))));
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", locale);
        Date date = new Date(com.google.ads.mediation.unity.b.t(this));
        jl.d dVar = new jl.d(this, 1, "Install Time");
        dVar.setValue(simpleDateFormat.format(date));
        dVar.setThinkItemClickListener(this.l);
        arrayList.add(dVar);
        jl.d dVar2 = new jl.d(this, 2, "User Random Number");
        SharedPreferences sharedPreferences = getSharedPreferences("main", 0);
        dVar2.setValue(String.valueOf(sharedPreferences != null ? sharedPreferences.getInt("user_random_number", -1) : -1));
        dVar2.setThinkItemClickListener(this.l);
        arrayList.add(dVar2);
        jl.d dVar3 = new jl.d(this, 6, "Misc Infos");
        dVar3.setThinkItemClickListener(this.l);
        arrayList.add(dVar3);
        nk.b.v().getClass();
        SharedPreferences sharedPreferences2 = getSharedPreferences("app_remote_config", 0);
        com.thinkyeah.common.ui.thinklist.a aVar = new com.thinkyeah.common.ui.thinklist.a("Enable Remote Config Test", this, sharedPreferences2 == null ? false : sharedPreferences2.getBoolean("test_enabled", false), 8);
        aVar.setToggleButtonClickListener(this.m);
        arrayList.add(aVar);
        jl.d dVar4 = new jl.d(this, 7, "Remote Config Version ID");
        nk.b v = nk.b.v();
        if (((nk.d) v).e) {
            o = ((nk.d) v).a.o();
        } else {
            o = null;
            nk.d.k.l("getVersionId. RemoteConfigController is not ready, return default", (Exception) null);
        }
        dVar4.setValue(String.valueOf(o));
        dVar4.setThinkItemClickListener(this.l);
        arrayList.add(dVar4);
        SharedPreferences sharedPreferences3 = getSharedPreferences("app_remote_config", 0);
        com.thinkyeah.common.ui.thinklist.a aVar2 = new com.thinkyeah.common.ui.thinklist.a("Remote Config Force Refresh", this, sharedPreferences3 != null ? sharedPreferences3.getBoolean("force_refresh_enabled", false) : false, 9);
        aVar2.setToggleButtonClickListener(this.m);
        arrayList.add(aVar2);
        findViewById(2131363212).setAdapter(new jl.b(arrayList));
    }

    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(2131558475);
        TitleBar.a configure = findViewById(2131363196).getConfigure();
        configure.f("Developer");
        configure.g(new com.facebook.login.d(this, 22));
        configure.a();
        Z2();
        Y2();
        X2();
        ArrayList arrayList = new ArrayList();
        jl.d dVar = new jl.d(this, 311, "Antivirus");
        androidx.core.view.inputmethod.b bVar = this.l;
        dVar.setThinkItemClickListener(bVar);
        arrayList.add(dVar);
        jl.d dVar2 = new jl.d(this, 301, "App Lock");
        dVar2.setThinkItemClickListener(bVar);
        arrayList.add(dVar2);
        jl.d dVar3 = new jl.d(this, 303, "Similar Photos");
        dVar3.setThinkItemClickListener(bVar);
        arrayList.add(dVar3);
        jl.d dVar4 = new jl.d(this, 305, "Hibernate Apps");
        dVar4.setThinkItemClickListener(bVar);
        arrayList.add(dVar4);
        jl.d dVar5 = new jl.d(this, 306, "Junk Clean");
        dVar5.setThinkItemClickListener(bVar);
        arrayList.add(dVar5);
        jl.d dVar6 = new jl.d(this, 315, "Battery");
        dVar6.setThinkItemClickListener(bVar);
        arrayList.add(dVar6);
        jl.d dVar7 = new jl.d(this, 313, "Notification Reminder");
        dVar7.setThinkItemClickListener(bVar);
        arrayList.add(dVar7);
        jl.d dVar8 = new jl.d(this, 314, "News");
        dVar8.setThinkItemClickListener(bVar);
        arrayList.add(dVar8);
        findViewById(2131363211).setAdapter(new jl.b(arrayList));
    }
}