VMOS Pro v2.9.9版本的 MD5 值为:42f292af86d02c1a08555cf2d3982a52

以下内容为反编译后的 CrashManager.java 源代码,内容仅作参考


package com.mobile.auth.gatewayauth.manager;

import android.content.Context;
import android.util.Log;
import com.mobile.auth.gatewayauth.annotations.SafeProtector;
import com.mobile.auth.gatewayauth.model.UStruct;
import com.mobile.auth.gatewayauth.utils.ReflectionUtils;
import com.mobile.auth.gatewayauth.utils.g;
import com.nirvana.tools.crash.CrashSdk;
import com.nirvana.tools.crash.OnCrashCallback;
import com.nirvana.tools.crash.SdkInfo;
import java.util.HashMap;
public class CrashManager {
    private static volatile CrashManager f49087a;
    private Context b;
    private d c;
    private OnCrashCallback d;
    private SdkInfo e;

    static {
        System.loadLibrary("auth_number_product-2.12.3.4-nolog-online-standard-channel_alijtca_plus");
    }

    private CrashManager(Context context) {
        Context applicationContext = context.getApplicationContext();
        this.b = applicationContext;
        this.c = new d(applicationContext);
        try {
            this.d = new OnCrashCallback() {
                @Override
                public void onCrashOccurred(String str, String str2, String str3, String str4, boolean z, String str5) {
                    try {
                        UStruct build = UStruct.newUStruct().crashId(str4).isAnnihilated(z).crashType(str5).crashThread(str).build();
                        build.setIsSuccess(null);
                        build.setEndTime(null);
                        build.setStartTime(null);
                        build.setWholeMS(null);
                        com.mobile.auth.l.a.a(CrashManager.b(CrashManager.this)).a(CrashManager.a(CrashManager.this).b("", "sdk.crash.occurred", build, ""), 2);
                        com.mobile.auth.l.a.a(CrashManager.b(CrashManager.this)).b();
                    } catch (Throwable th) {
                        try {
                            com.mobile.auth.gatewayauth.a.a(th);
                        } catch (Throwable th2) {
                            com.mobile.auth.gatewayauth.a.a(th2);
                        }
                    }
                }

                @Override
                public void onCrashUploadFailed(String str, String str2, String str3) {
                    try {
                        CrashManager.a(CrashManager.this, str, str3);
                    } catch (Throwable th) {
                        try {
                            com.mobile.auth.gatewayauth.a.a(th);
                        } catch (Throwable th2) {
                            com.mobile.auth.gatewayauth.a.a(th2);
                        }
                    }
                }
            };
        } catch (Throwable unused) {
        }
    }

    public static CrashManager a(Context context) {
        try {
            if (f49087a == null) {
                synchronized (CrashManager.class) {
                    if (f49087a == null) {
                        f49087a = new CrashManager(context);
                    }
                }
            }
            return f49087a;
        } catch (Throwable th) {
            try {
                com.mobile.auth.gatewayauth.a.a(th);
                return null;
            } catch (Throwable th2) {
                com.mobile.auth.gatewayauth.a.a(th2);
                return null;
            }
        }
    }

    public static d a(CrashManager crashManager) {
        try {
            return crashManager.c;
        } catch (Throwable th) {
            try {
                com.mobile.auth.gatewayauth.a.a(th);
                return null;
            } catch (Throwable th2) {
                com.mobile.auth.gatewayauth.a.a(th2);
                return null;
            }
        }
    }

    public static void a(CrashManager crashManager, String str, String str2) {
        try {
            crashManager.a(str, str2);
        } catch (Throwable th) {
            try {
                com.mobile.auth.gatewayauth.a.a(th);
            } catch (Throwable th2) {
                com.mobile.auth.gatewayauth.a.a(th2);
            }
        }
    }

    private void a(String str, String str2) {
        try {
            com.mobile.auth.l.a a2 = com.mobile.auth.l.a.a(ReflectionUtils.getApplication());
            if (a2 == null) {
                g.c(str);
                return;
            }
            long currentTimeMillis = System.currentTimeMillis();
            a2.f("Sdk_Crash![", str2, "]", str, "deviceId:", d.f49125a);
            a2.a(currentTimeMillis, e51.f14594 + System.currentTimeMillis(), 6);
        } catch (Throwable th) {
            try {
                com.mobile.auth.gatewayauth.a.a(th);
            } catch (Throwable th2) {
                com.mobile.auth.gatewayauth.a.a(th2);
            }
        }
    }

    public static Context b(CrashManager crashManager) {
        try {
            return crashManager.b;
        } catch (Throwable th) {
            try {
                com.mobile.auth.gatewayauth.a.a(th);
                return null;
            } catch (Throwable th2) {
                com.mobile.auth.gatewayauth.a.a(th2);
                return null;
            }
        }
    }

    public void a(String str, String str2, String str3, boolean z, String str4) {
        try {
            OnCrashCallback onCrashCallback = this.d;
            if (onCrashCallback != null) {
                onCrashCallback.onCrashOccurred(str, "DYPNS", str2, str3, z, str4);
            }
        } catch (Throwable th) {
            try {
                com.mobile.auth.gatewayauth.a.a(th);
            } catch (Throwable th2) {
                com.mobile.auth.gatewayauth.a.a(th2);
            }
        }
    }

    public void a(Thread thread, Throwable th, String str) {
        try {
            g.c("UploadException[" + str + "]:" + Log.getStackTraceString(th));
            boolean z = false;
            if (FeatureManager.getInstance().get(FeatureManager.FEATURE_KEY_CRASH) == null) {
                HashMap hashMap = new HashMap();
                hashMap.put("uuid", str);
                hashMap.put("deviceID", d.f49125a);
                try {
                    z = CrashSdk.getInstance().uploadException(this.e, thread, th, hashMap);
                } catch (Throwable unused) {
                }
            }
            if (z) {
                return;
            }
            a(Log.getStackTraceString(th), str);
        } catch (Throwable th2) {
            try {
                com.mobile.auth.gatewayauth.a.a(th2);
            } catch (Throwable th3) {
                com.mobile.auth.gatewayauth.a.a(th3);
            }
        }
    }

    @SafeProtector
    public native boolean loadCrashComponent();
}