导航菜单

页面标题

页面副标题

CallApp v2.226 - b.java 源代码

正在查看: CallApp v2.226 应用的 b.java JAVA 源代码文件

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


package com.apm.insight.h;

import android.text.TextUtils;
import android.util.Log;
import androidx.annotation.Nullable;
import com.apm.insight.e;
import com.apm.insight.l.f;
import com.apm.insight.l.j;
import com.apm.insight.nativecrash.NativeImpl;
import com.apm.insight.runtime.m;
import com.apm.insight.runtime.n;
import java.io.File;
import java.util.HashMap;
import java.util.Map;

public final class b {

    private static HashMap<String, String> f7985a;

    private Map<String, String> f7986b;

    public b(File file) {
        String a8;
        File c6 = j.c(file);
        if (!c6.exists() || c6.length() == 0 || (a8 = NativeImpl.a(c6.getAbsolutePath())) == null) {
            return;
        }
        String[] split = a8.split("\n");
        this.f7986b = new HashMap();
        for (String str : split) {
            String[] split2 = str.split("=");
            if (split2.length == 2) {
                this.f7986b.put(split2[0], split2[1]);
            }
        }
    }

    public static String a(String str) {
        return e.g().getFilesDir() + "/apminsight/selflib/lib" + str + ".so";
    }

    public static void b(final String str) {
        m.a().a(new Runnable() {

            private boolean f7987a = false;

            @Override
            public final void run() {
                String str2;
                b.b();
                if (b.c(str)) {
                    return;
                }
                n.a("updateSo", str);
                File file = new File(b.a(str));
                file.getParentFile().mkdirs();
                if (file.exists()) {
                    file.delete();
                }
                String str3 = "doUnpackLibrary: " + str;
                if (e.i().isDebugMode()) {
                    Log.w("npth", str3);
                }
                try {
                    str2 = c.a(e.g(), str, file);
                } catch (Throwable th) {
                    n.a("updateSoError", str);
                    com.apm.insight.c.a();
                    com.apm.insight.runtime.j.a(th, "NPTH_CATCH");
                    str2 = null;
                }
                if (str2 != null) {
                    if (this.f7987a) {
                        n.a("updateSoFailed", str);
                        return;
                    }
                    this.f7987a = true;
                    n.a("updateSoPostRetry", str);
                    m.a().a(this, 3000L);
                    return;
                }
                b.f7985a.put(file.getName(), "2.0.0.3");
                try {
                    f.a(new File(e.g().getFilesDir() + "/apminsight/selflib/" + str + ".ver"), "2.0.0.3", false);
                } catch (Throwable unused) {
                }
                n.a("updateSoSuccess", str);
            }
        });
    }

    public final boolean d() {
        Map<String, String> map = this.f7986b;
        return (map == null || map.isEmpty() || TextUtils.isEmpty(this.f7986b.get("process_name")) || TextUtils.isEmpty(this.f7986b.get("crash_thread_name")) || TextUtils.isEmpty(this.f7986b.get("pid")) || TextUtils.isEmpty(this.f7986b.get("tid")) || TextUtils.isEmpty(this.f7986b.get("start_time")) || TextUtils.isEmpty(this.f7986b.get("crash_time")) || TextUtils.isEmpty(this.f7986b.get("signal_line"))) ? false : true;
    }

    @Nullable
    public final String e() {
        return this.f7986b.get("signal_line");
    }

    public final Map<String, String> f() {
        return this.f7986b;
    }

    public static String a() {
        return e.g().getFilesDir() + "/apminsight/selflib/";
    }

    public static void b() {
        if (f7985a == null) {
            f7985a = new HashMap<>();
            File file = new File(e.g().getFilesDir(), "/apminsight/selflib/");
            String[] list = file.list();
            if (list != null) {
                for (String str : list) {
                    if (str.endsWith(".ver")) {
                        try {
                            f7985a.put(com.mobilefuse.sdk.assetsmanager.a.g(4, 0, str), f.a(file.getAbsolutePath() + "/" + str, "\n"));
                        } catch (Throwable th) {
                            com.apm.insight.c.a();
                            com.apm.insight.runtime.j.a(th, "NPTH_CATCH");
                        }
                    } else if (!str.endsWith(".so")) {
                        f.a(new File(file, str));
                    }
                }
            }
        }
    }

    public static boolean c(String str) {
        return "2.0.0.3".equals(f7985a.get(str)) && new File(a(str)).exists();
    }
}