android.app.Activity.getClassLoader()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(253)

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

Activity.getClassLoader介绍

暂无

代码示例

代码示例来源:origin: ankidroid/Anki-Android

optimizedDexOutputPath.getAbsolutePath(),
    null,
    mMainActivity.getClassLoader());
Class hookClass = null;

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

@Override
public void callActivityOnNewIntent(Activity activity, Intent intent) {
  PluginInjector.injectInstrumetionFor360Safe(activity, this);
  if (intent != null) {
    intent.setExtrasClassLoader(activity.getClassLoader());
  }
  real.callActivityOnNewIntent(activity, intent);
}

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

@Override
public void callActivityOnPostCreate(Activity activity, Bundle icicle) {
  PluginInjector.injectInstrumetionFor360Safe(activity, this);
  if (icicle != null) {
    icicle.setClassLoader(activity.getClassLoader());
  }
  real.callActivityOnPostCreate(activity, icicle);
}

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

@Override
public void callActivityOnSaveInstanceState(Activity activity, Bundle outState) {
  PluginInjector.injectInstrumetionFor360Safe(activity, this);
  if (outState != null) {
    outState.setClassLoader(activity.getClassLoader());
  }
  real.callActivityOnSaveInstanceState(activity, outState);
}

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

@Override
public void callActivityOnRestoreInstanceState(Activity activity, Bundle savedInstanceState) {
  PluginInjector.injectInstrumetionFor360Safe(activity, this);
  if (savedInstanceState != null) {
    savedInstanceState.setClassLoader(activity.getClassLoader());
  }
  real.callActivityOnRestoreInstanceState(activity, savedInstanceState);
}

代码示例来源:origin: com.uphyca/android-junit4-robolectric

/**
 * @return
 * @see android.content.ContextWrapper#getClassLoader()
 */
public ClassLoader getClassLoader() {
  return mActivity.getClassLoader();
}

代码示例来源:origin: RealMoMo/Study_Android_Demo

@Override
public ClassLoader getClassLoader() {
  return mProxyActivity.getClassLoader();
}

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

intent.setExtrasClassLoader(activity.getClassLoader());
icicle.setClassLoader(activity.getClassLoader());

代码示例来源:origin: iqiyi/Neptune

@Override
public ClassLoader getClassLoader() {
  if (mLoadedApk == null) {
    return super.getClassLoader();
  }
  return mLoadedApk.getPluginClassLoader();
}

代码示例来源:origin: stackoverflow.com

Class<? extends MessageManager> messageManagerClass = (Class<? extends MessageManager>) activity.getClassLoader().loadClass( "ca.qc.webalterpraxis.cinedroid.message.MessageManagerSDK7" );     
Method singletonMethod = messageManagerClass.getMethod("getInstance", Activity.class );
instance = (MessageManager) singletonMethod.invoke( null , activity);

代码示例来源:origin: iqiyi/Neptune

ClassLoader cl = mPlugin != null ? mPlugin.getPluginClassLoader() : activity.getClassLoader();

代码示例来源:origin: wasdennnoch/AndroidN-ify

if (sClassUtils == null) {
  try {
    sClassUtils = XposedHelpers.findClass(CLASS_UTILS, mActivity.getClassLoader());
  } catch (Throwable t) { // HTC / Proguard
    sClassUtils = XposedHelpers.findClass(XposedHook.PACKAGE_SETTINGS + ".sd", mActivity.getClassLoader());

相关文章

Activity类方法