You've already forked ChameleonBLEAPI
mirror of
https://github.com/RfidResearchGroup/ChameleonBLEAPI.git
synced 2026-05-12 11:20:47 -07:00
30 lines
680 B
Java
30 lines
680 B
Java
package com.proxgrind.chameleon.utils.system;
|
|
|
|
import android.app.Activity;
|
|
import android.app.Application;
|
|
|
|
public class AppContextUtils {
|
|
private static AppContextUtils thiz = null;
|
|
public static Application app;
|
|
|
|
private AppContextUtils() {
|
|
}
|
|
|
|
public static AppContextUtils getInstance() {
|
|
if (thiz == null) {
|
|
thiz = new AppContextUtils();
|
|
}
|
|
return thiz;
|
|
}
|
|
|
|
public static void register(Application app) {
|
|
AppContextUtils.app = app;
|
|
}
|
|
|
|
public void finishAll() {
|
|
for (Activity activity : CrashUtils.activities) {
|
|
activity.finish();
|
|
}
|
|
}
|
|
}
|