android.app.Instrumentation.callApplicationOnCreate()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(203)

本文整理了Java中android.app.Instrumentation.callApplicationOnCreate()方法的一些代码示例,展示了Instrumentation.callApplicationOnCreate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instrumentation.callApplicationOnCreate()方法的具体详情如下:
包路径:android.app.Instrumentation
类名称:Instrumentation
方法名:callApplicationOnCreate

Instrumentation.callApplicationOnCreate介绍

暂无

代码示例

代码示例来源:origin: android-hacker/VirtualXposed

@Override
public void callApplicationOnCreate(Application app) {
  base.callApplicationOnCreate(app);
}

代码示例来源:origin: android-hacker/VirtualXposed

mInstrumentation.callApplicationOnCreate(mInitialApplication);
InvocationStubManager.getInstance().checkEnv(HCallbackStub.class);
if (conflict) {

代码示例来源:origin: limpoxe/Android-Plugin-Framework

/**
 * 此方法在application的attach之后被ActivityThread调用
 * @param app
 */
@Override
public void callApplicationOnCreate(Application app) {
  //ContentProvider的相关操作应该放在installContentProvider之后执行,
  //而installContentProvider是ActivityThread在调用application的attach之后,onCreate之前执行
  //因此下面的初始化操作的最佳时机是在application的oncreate之前执行,因为它们会触发ContentProvider调用
  PluginLoader.removeNotSupportedPluginIfUpgraded();
  LocalServiceManager.init();
  if (ProcessUtil.isPluginProcess()) {
    Iterator<PluginDescriptor> itr = PluginManagerHelper.getPlugins().iterator();
    while (itr.hasNext()) {
      PluginDescriptor plugin = itr.next();
      LocalServiceManager.registerService(plugin);
    }
  }
  real.callApplicationOnCreate(app);
}

代码示例来源:origin: bzsome/VirtualApp-x326

@Override
public void callApplicationOnCreate(Application app) {
  base.callApplicationOnCreate(app);
}

代码示例来源:origin: darkskygit/VirtualApp

@Override
public void callApplicationOnCreate(Application app) {
  base.callApplicationOnCreate(app);
}

代码示例来源:origin: ximsfei/Android-plugin-support

@Override
public void callApplicationOnCreate(Application app) {
  super.callApplicationOnCreate(app);
}

代码示例来源:origin: luili16/UIMocker

@Override
@CallSuper
public void callApplicationOnCreate(Application app) {
  if (DEBUG) {
    Logger.d(TAG,"callApplicationOnCreate");
  }
  mInstrumentation.callApplicationOnCreate(app);
}

代码示例来源:origin: baidu/GPT

@Override
public void callApplicationOnCreate(Application app) {
  onCallApplicationOnCreate(app);
  long start = SystemClock.elapsedRealtime();
  super.callApplicationOnCreate(app);
  // 统计插件自己Application onCreate的时长
  long time = SystemClock.elapsedRealtime() - start;
  PluginTimeLine timeLine = ProxyEnvironment.pluginTimeLineMap.get(app.getPackageName());
  if (timeLine != null) {
    timeLine.createApplicationTime = time;
  }
  ReportManger.getInstance().onCreateApplication(app.getApplicationContext(), app.getPackageName(),
      time);
}

代码示例来源:origin: ximsfei/Android-plugin-support

public static Application makeDynamicApplication(Context applicationContext, ClassLoader cl,
                       DynamicApkInfo apkInfo) {
    Application app = null;

    String appClass = apkInfo.applicationInfo.className;
    if (appClass == null) {
      appClass = "android.app.Application";
    }

    try {
      DynamicContextImpl appContext = DynamicContextImpl.createApplicationContext(
          applicationContext, apkInfo);
      app = (Application) cl.loadClass(appClass).newInstance();
      Reflect.create(Application.class).setMethod("attach",
          Context.class).invoke(app, appContext);
      DynamicActivityThread.getInstance().getInstrumentation().callApplicationOnCreate(app);
    } catch (Exception e) {
    }

    return app;
  }
}

代码示例来源:origin: bzsome/VirtualApp-x326

mInstrumentation.callApplicationOnCreate(mInitialApplication);
InvocationStubManager.getInstance().checkEnv(HCallbackStub.class);
if (conflict) {

代码示例来源:origin: darkskygit/VirtualApp

mInstrumentation.callApplicationOnCreate(mInitialApplication);
InvocationStubManager.getInstance().checkEnv(HCallbackStub.class);
if (conflict) {

相关文章

Instrumentation类方法