b.java 源代码


package com.apm.insight.c;

import com.apm.insight.h;
import java.io.File;
import java.util.concurrent.atomic.AtomicBoolean;

public class b {

    private static AtomicBoolean f6391a = new AtomicBoolean(false);

    public static boolean a() {
        synchronized (f6391a) {
            if (f6391a.get()) {
                return false;
            }
            f6391a.set(true);
            return b();
        }
    }

    public static boolean b() {
        if (!com.apm.insight.runtime.a.h()) {
            return false;
        }
        try {
            File file = new File(h.h().getFilesDir(), "apminsight/crashCommand");
            file.mkdirs();
            new File(file, "0_" + System.currentTimeMillis()).createNewFile();
            return true;
        } catch (Throwable unused) {
            return false;
        }
    }
}