Appliction 基础类 统一管理所有activity
public class a extends Application {
private static a b;
private List a = new ArrayList();
private a() {
}
public static a a() {
if (b == null) {
b = new a();
}
return b;
}
public void a(Activity activity) {
this.a.add(activity);
}
//终止
public void onTerminate() {
super.onTerminate();
for (Activity finish : this.a) {
finish.finish();
}
Process.killProcess(Process.myPid());
}
}