All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.didiglobal.booster.instrument.ResChecker Maven / Gradle / Ivy

There is a newer version: 5.0.0
Show newest version
package com.didiglobal.booster.instrument;

import android.app.Application;
import android.os.Process;
import android.util.Log;

import static com.didiglobal.booster.instrument.Constants.TAG;

/**
 * @author neighbWang
 */
public class ResChecker {

    public static void checkRes(final Application app) {
        if (null == app.getAssets() || null == app.getResources()) {
            final int pid = Process.myPid();
            Log.w(TAG, "Process " + pid + " is going to be killed");
            Process.killProcess(pid);
            System.exit(10);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy