导航菜单

页面标题

页面副标题

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

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

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


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

import android.app.Dialog;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.graphics.Point;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.text.TextUtils;
import android.widget.LinearLayout;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.FragmentActivity;
import com.fancyclean.boost.main.ui.activity.developer.MiscInfoDebugActivity;
import com.google.firebase.messaging.FirebaseMessaging;
import com.rengwuxian.materialedittext.MaterialEditText;
import com.thinkyeah.common.ui.dialog.c;
import com.thinkyeah.common.ui.view.TitleBar;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Locale;
import jl.c;
import jl.d;
import jl.f;
import t4.g;
import vj.h;

public class MiscInfoDebugActivity extends v7.a<hl.b> {
    public static final h q = new h("MiscInfoDebugActivity");
    public String l;
    public String m;
    public d n;
    public d o;
    public final a p = new a();

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

        public final void c(int i, int i10) {
            FragmentActivity fragmentActivity = MiscInfoDebugActivity.this;
            if (i10 == 1) {
                new b().show(fragmentActivity.getSupportFragmentManager(), "LaunchCountDialogFragment");
                return;
            }
            if (i10 == 3) {
                int i11 = c7.c.a;
                SharedPreferences sharedPreferences = fragmentActivity.getSharedPreferences("main", 0);
                SharedPreferences.Editor edit = sharedPreferences != null ? sharedPreferences.edit() : null;
                if (edit != null) {
                    edit.putInt("channel_id", 0);
                    edit.apply();
                }
                fragmentActivity.X2();
                return;
            }
            if (i10 == 7) {
                if (TextUtils.isEmpty(fragmentActivity.l)) {
                    return;
                }
                ((ClipboardManager) fragmentActivity.getSystemService("clipboard")).setPrimaryClip(ClipData.newPlainText(null, fragmentActivity.l));
                Toast.makeText((Context) fragmentActivity, (CharSequence) "Already copied to ClipBoard.", 0).show();
                return;
            }
            if (i10 == 9) {
                String str = fragmentActivity.m;
                if (TextUtils.isEmpty(str)) {
                    Toast.makeText((Context) fragmentActivity, (CharSequence) "PushInstanceToken is not found", 0).show();
                    return;
                } else {
                    ((ClipboardManager) fragmentActivity.getSystemService("clipboard")).setPrimaryClip(ClipData.newPlainText(null, str));
                    Toast.makeText((Context) fragmentActivity, (CharSequence) "Already copied to ClipBoard.", 0).show();
                    return;
                }
            }
            if (i10 != 10) {
                return;
            }
            SharedPreferences sharedPreferences2 = fragmentActivity.getSharedPreferences("main", 0);
            int i12 = sharedPreferences2 != null ? sharedPreferences2.getInt("fresh_install_version_code", 0) : 0;
            c cVar = new c();
            Bundle bundle = new Bundle();
            bundle.putLong("version_code", i12);
            cVar.setArguments(bundle);
            cVar.j0(fragmentActivity, "UpdateVersionCodeDialogFragment");
        }
    }

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

        @NonNull
        public final Dialog onCreateDialog(Bundle bundle) {
            ArrayList arrayList = new ArrayList();
            arrayList.add(new c.b("Reset to 0"));
            arrayList.add(new c.b("Increase"));
            c.a aVar = new c.a(getActivity());
            aVar.d = "Launch Count";
            g gVar = new g(this, 8);
            aVar.v = arrayList;
            aVar.w = gVar;
            return aVar.a();
        }
    }

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

        @NonNull
        public final Dialog onCreateDialog(Bundle bundle) {
            long j = getArguments().getLong("version_code");
            final MaterialEditText materialEditText = new MaterialEditText(getActivity());
            materialEditText.setMetTextColor(ContextCompat.getColor(getActivity(), 2131100564));
            materialEditText.setFloatingLabel(2);
            materialEditText.setHint("Version Code");
            materialEditText.setText(String.valueOf(j));
            materialEditText.setFloatingLabelText((CharSequence) null);
            materialEditText.setSingleLine(true);
            LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
            layoutParams.setMargins(getResources().getDimensionPixelSize(2131165961), getResources().getDimensionPixelSize(2131165962), getResources().getDimensionPixelSize(2131165961), getResources().getDimensionPixelSize(2131165962));
            materialEditText.setLayoutParams(layoutParams);
            materialEditText.setInputType(2);
            c.a aVar = new c.a(getActivity());
            aVar.d = "Update Version Code";
            aVar.x = materialEditText;
            aVar.e(2131887306, (DialogInterface.OnClickListener) null);
            final AlertDialog a = aVar.a();
            a.setOnShowListener(new DialogInterface.OnShowListener() {
                @Override
                public final void onShow(DialogInterface dialogInterface) {
                    int i = MiscInfoDebugActivity.c.c;
                    MiscInfoDebugActivity.c cVar = MiscInfoDebugActivity.c.this;
                    cVar.getClass();
                    AlertDialog alertDialog = a;
                    alertDialog.getButton(-1).setOnClickListener(new c6.h(cVar, materialEditText, alertDialog, 1));
                }
            });
            return a;
        }
    }

    public final void X2() {
        LinkedList linkedList = new LinkedList();
        h hVar = y7.a.a;
        linkedList.add(new f(this, "Build Type", "Release"));
        d dVar = new d(this, 0, "SDK Int");
        dVar.setValue(Build.VERSION.SDK_INT + "");
        linkedList.add(dVar);
        d dVar2 = new d(this, 0, "Android Id");
        h hVar2 = ml.b.a;
        dVar2.setValue(Settings.Secure.getString(getContentResolver(), "android_id"));
        linkedList.add(dVar2);
        d dVar3 = new d(this, 1, "Launch Count");
        StringBuilder sb2 = new StringBuilder();
        SharedPreferences sharedPreferences = getSharedPreferences("main", 0);
        sb2.append(sharedPreferences == null ? 0 : sharedPreferences.getInt("launch_times", 0));
        sb2.append("");
        dVar3.setValue(sb2.toString());
        a aVar = this.p;
        dVar3.setThinkItemClickListener(aVar);
        linkedList.add(dVar3);
        d dVar4 = new d(this, 10, "Fresh Install Version Code");
        SharedPreferences sharedPreferences2 = getSharedPreferences("main", 0);
        dVar4.setValue(String.valueOf(sharedPreferences2 == null ? 0 : sharedPreferences2.getInt("fresh_install_version_code", 0)));
        dVar4.setThinkItemClickListener(aVar);
        linkedList.add(dVar4);
        d dVar5 = new d(this, 0, "Initial Channel");
        android.support.v4.media.b.a(c7.c.a(this));
        dVar5.setValue("Global");
        linkedList.add(dVar5);
        d dVar6 = new d(this, 3, "Build Channel");
        dVar6.setValue("Global");
        dVar6.setThinkItemClickListener(aVar);
        linkedList.add(dVar6);
        d dVar7 = new d(this, 7, "Google Advertising Id");
        this.n = dVar7;
        dVar7.setThinkItemClickListener(aVar);
        linkedList.add(this.n);
        AsyncTask.execute((Runnable) new androidx.activity.d(this, 14));
        d dVar8 = new d(this, 9, "Push Instance Token");
        dVar8.setThinkItemClickListener(aVar);
        this.o = dVar8;
        linkedList.add(dVar8);
        d dVar9 = new d(this, 8, "App Installer");
        String installerPackageName = getPackageManager().getInstallerPackageName(getPackageName());
        q.c(android.support.v4.media.b.l("app installer: ", installerPackageName));
        if (installerPackageName == null) {
            installerPackageName = "unknown";
        }
        dVar9.setValue(installerPackageName);
        dVar9.setThinkItemClickListener(aVar);
        linkedList.add(dVar9);
        d dVar10 = new d(this, 41, "Promotion Source");
        SharedPreferences sharedPreferences3 = getSharedPreferences("main", 0);
        dVar10.setValue(sharedPreferences3 != null ? sharedPreferences3.getString("promotion_source", null) : null);
        linkedList.add(dVar10);
        d dVar11 = new d(this, 0, "Screen Size");
        Point j = ml.b.j(this);
        Point j10 = ml.b.j(this);
        dVar11.setComment(String.format(Locale.US, "px: %d x %d, dp: %.1f x %.1f", Integer.valueOf(j.x), Integer.valueOf(j.y), Float.valueOf(j10.x / getResources().getDisplayMetrics().density), Float.valueOf(j10.y / getResources().getDisplayMetrics().density)));
        linkedList.add(dVar11);
        findViewById(2131363212).setAdapter(new jl.b(linkedList));
        FirebaseMessaging.c().e().addOnCompleteListener(new androidx.core.view.inputmethod.b(this, 22));
    }

    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(2131558494);
        TitleBar.a configure = findViewById(2131363196).getConfigure();
        configure.f("Misc Info");
        configure.g(new com.facebook.login.d(this, 23));
        configure.a();
        X2();
    }

    public final void onDestroy() {
        super/*il.b*/.onDestroy();
    }
}