钱能钱包 v3.10.2版本的 MD5 值为:339a4b585ef2aa3bfaf7e4baeb254647

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


package com.netease.nis.crashreport;

import com.netease.nis.basesdk.Logger;
import com.netease.nis.basesdk.crash.CrashReportRunnable;
import com.netease.nis.basesdk.crash.CrashStore;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public abstract class BaseNdkHandler {
    private CrashStore f5895c;
    private String a = "https://crash.163.com/uploadCrashLogInfo.do";
    private String f5894b = "https://crash.163.com/client/api/uploadStartUpInfo.do";
    private final d f5896d = new b(this);

    public abstract Map buildCrashInfo(String str);

    public abstract Map buildStartInfo();

    public void initialize(String str, String str2) {
        CrashStore crashStore = CrashStore.getInstance();
        this.f5895c = crashStore;
        crashStore.initialize(str);
        NativeHandler.b().a(str, str2, this.f5896d);
        if (buildStartInfo() != null) {
            new Thread(new e.f.e.a.a.a(buildStartInfo(), this.f5894b, new a(this))).start();
        }
        Logger.d("check and report crash info");
        File[] loadNative = this.f5895c.loadNative();
        if (loadNative.length > 0) {
            ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(0, 5, 5L, TimeUnit.SECONDS, new ArrayBlockingQueue(10), Executors.defaultThreadFactory(), new ThreadPoolExecutor.DiscardPolicy());
            for (File file : loadNative) {
                try {
                    String parse = this.f5895c.parse(file.getAbsolutePath());
                    if (interceptHandleException(parse)) {
                        this.f5895c.delete(file.getAbsolutePath());
                    } else {
                        Logger.d(parse);
                        threadPoolExecutor.execute(new CrashReportRunnable(buildCrashInfo(parse), this.a, new c(this, file.getAbsolutePath())));
                    }
                } catch (UnsupportedEncodingException unused) {
                    Logger.e("BaseNdkHandler", "logInfo encode error");
                }
            }
        }
    }

    public boolean interceptHandleException(String str) {
        return false;
    }

    public void report(String str) {
        String parse = this.f5895c.parse(str);
        if (interceptHandleException(parse)) {
            this.f5895c.delete(str);
            return;
        }
        Logger.d(parse);
        Thread thread = new Thread(new CrashReportRunnable(buildCrashInfo(parse), this.a, new c(this, str)));
        thread.start();
        try {
            thread.join(3000L);
        } catch (InterruptedException unused) {
            Thread.currentThread().interrupt();
            Logger.e("quick upload isInterrupted");
        }
    }

    public void setStartUrl(String str) {
        this.f5894b = str;
    }

    public void setUploadUrl(String str) {
        this.a = str;
    }

    public void testCrash() {
        NativeHandler.b().d();
    }
}