public class CoreApplication
extends Application
限定符和类型 | 字段和说明 |
---|---|
List<WeakReference<Activity>> |
mActivityManager |
构造器和说明 |
---|
CoreApplication() |
限定符和类型 | 方法和说明 |
---|---|
void |
addActivityToManager(Activity activity)
添加一个activity到管理列表里
|
protected void |
attachBaseContext(Context base) |
void |
closeAllActivities()
关闭所有activity
|
void |
delActivityFromManager(Activity activity)
删除activity从管理列表里
|
void |
exit()
退出应用
|
List<WeakReference<Activity>> |
getActivityManager()
获取所有应用的所有activity
|
AppService |
getAppService(String name)
获取应用服务
|
protected AppServiceManager |
getAppServiceManager()
获取应用服务管理器
|
ModuleManager |
getModuleManager() |
SessionService |
getSession()
获取session
|
PoolManager.Pool |
getSharePool()
获取共享线程池
|
protected void |
init()
初始化方法,当setAsyncInit为true 此处执行异步init
|
protected boolean |
isAsyncInit()
获取是否异步初始化
|
boolean |
isDevMode()
获取当前是否研发模式 研发模式log级别为VERBOSE,非研发模式log级别为WARN
|
protected boolean |
isStrictMode()
是否严格模式
|
void |
onCreate() |
void |
onLowMemory() |
void |
onTerminate() |
void |
onTrimMemory(int level) |
<T> Future<T> |
post(Callable<T> callable)
提交一个后台回调任务
|
Future |
post(Runnable runnable)
提交一个后台线程任务
|
<T> Future<T> |
post(Runnable runnable,
T result)
提交一个后台线程任务
|
Future |
post(Task task)
提交一个后台回调任务
|
protected void |
setAsyncInit(boolean asyncInit)
设置是否异步初始化(在super.onCreate方法之前调用才有效)
|
protected void |
setDevMode(boolean devMode)
设置研发模式 (在super.onCreate方法之前调用才有效)
|
protected void |
setStrictMode(boolean mStrictMode)
设置是否严格模式 (在super.onCreate方法之前调用才有效)
|
public final List<WeakReference<Activity>> mActivityManager
public ModuleManager getModuleManager()
public void onCreate()
public void onTerminate()
public void onLowMemory()
public void onTrimMemory(int level)
protected final void setAsyncInit(boolean asyncInit)
asyncInit
- protected final boolean isAsyncInit()
protected void init()
public final boolean isDevMode()
protected final void setDevMode(boolean devMode)
devMode
- protected final boolean isStrictMode()
protected final void setStrictMode(boolean mStrictMode)
mStrictMode
- protected final AppServiceManager getAppServiceManager()
public final AppService getAppService(String name)
name
- public final PoolManager.Pool getSharePool()
public final void addActivityToManager(Activity activity)
activity
- public final void closeAllActivities()
public final void delActivityFromManager(Activity activity)
activity
- public final List<WeakReference<Activity>> getActivityManager()
public final SessionService getSession()
public void exit()
protected void attachBaseContext(Context base)