import android.app.Application; //导入方法依赖的package包/类
private void starting() {
if(RuntimeVariables.safeMode){
return;
}
if(BaselineInfoManager.instance().isUpdated("com.taobao.maindex")){
AdditionalPackageManager.getInstance();
}
long time = System.currentTimeMillis();
android.os.Bundle metaData = null;
try {
ApplicationInfo applicationInfo = RuntimeVariables.androidApplication.getPackageManager().getApplicationInfo(RuntimeVariables.androidApplication.getPackageName(),
PackageManager.GET_META_DATA);
metaData = applicationInfo.metaData;
} catch (NameNotFoundException e1) {
e1.printStackTrace();
}
if (metaData != null) {
String strApps = metaData.getString("application");
if (StringUtils.isNotEmpty(strApps)) {
String[] appClassNames = StringUtils.split(strApps, ",");
if (appClassNames == null || appClassNames.length == 0) {
appClassNames = new String[] { strApps };
}
for (String appClassName : appClassNames) {
try {
Application app = BundleLifecycleHandler.newApplication(appClassName,
Framework.getSystemClassLoader());
app.onCreate();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
final long timediff = System.currentTimeMillis() - time;
}