本文整理了Java中android.app.Instrumentation.callActivityOnRestoreInstanceState()
方法的一些代码示例,展示了Instrumentation.callActivityOnRestoreInstanceState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instrumentation.callActivityOnRestoreInstanceState()
方法的具体详情如下:
包路径:android.app.Instrumentation
类名称:Instrumentation
方法名:callActivityOnRestoreInstanceState
暂无
代码示例来源:origin: android-hacker/VirtualXposed
@Override
public void callActivityOnRestoreInstanceState(Activity activity, Bundle savedInstanceState) {
base.callActivityOnRestoreInstanceState(activity, savedInstanceState);
}
代码示例来源:origin: android-hacker/VirtualXposed
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void callActivityOnRestoreInstanceState(Activity activity, Bundle savedInstanceState,
PersistableBundle persistentState) {
base.callActivityOnRestoreInstanceState(activity, savedInstanceState, persistentState);
}
代码示例来源:origin: robolectric/robolectric
public ActivityController<T> restoreInstanceState(Bundle bundle) {
shadowMainLooper.runPaused(
() -> getInstrumentation().callActivityOnRestoreInstanceState(component, bundle));
return this;
}
代码示例来源:origin: ksoichiro/Android-ObservableScrollView
@Override
public void run() {
Bundle outState = new Bundle();
test.getInstrumentation().callActivityOnSaveInstanceState(activity, outState);
test.getInstrumentation().callActivityOnPause(activity);
test.getInstrumentation().callActivityOnResume(activity);
test.getInstrumentation().callActivityOnRestoreInstanceState(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: gdpancheng/LoonAndroid3
@Override
public void callActivityOnRestoreInstanceState(Activity activity, Bundle savedInstanceState) {
// 恢复一些数据
super.callActivityOnRestoreInstanceState(activity, savedInstanceState);
}
代码示例来源:origin: iqiyi/Neptune
/**
* 执行插件的onRestoreInstanceState方法
*
* @see android.app.Activity#onRestoreInstanceState(android.os.Bundle)
*/
@Override
public void callOnRestoreInstanceState(Bundle savedInstanceState) {
if (null != mHostInstr) {
mHostInstr.callActivityOnRestoreInstanceState(mPlugin, savedInstanceState);
}
}
代码示例来源:origin: bzsome/VirtualApp-x326
@Override
public void callActivityOnRestoreInstanceState(Activity activity, Bundle savedInstanceState) {
base.callActivityOnRestoreInstanceState(activity, savedInstanceState);
}
代码示例来源:origin: darkskygit/VirtualApp
@Override
public void callActivityOnRestoreInstanceState(Activity activity, Bundle savedInstanceState) {
base.callActivityOnRestoreInstanceState(activity, savedInstanceState);
}
代码示例来源:origin: darkskygit/VirtualApp
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void callActivityOnRestoreInstanceState(Activity activity, Bundle savedInstanceState,
PersistableBundle persistentState) {
base.callActivityOnRestoreInstanceState(activity, savedInstanceState, persistentState);
}
代码示例来源:origin: bzsome/VirtualApp-x326
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@Override
public void callActivityOnRestoreInstanceState(Activity activity, Bundle savedInstanceState,
PersistableBundle persistentState) {
base.callActivityOnRestoreInstanceState(activity, savedInstanceState, persistentState);
}
代码示例来源:origin: luili16/UIMocker
@Override
@CallSuper
public void callActivityOnRestoreInstanceState(Activity activity, Bundle savedInstanceState) {
if (DEBUG) {
Logger.d(TAG,"callActivityOnRestoreInstanceState");
}
mInstrumentation.callActivityOnRestoreInstanceState(activity, savedInstanceState);
}
代码示例来源:origin: luili16/UIMocker
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
@CallSuper
public void callActivityOnRestoreInstanceState(Activity activity, Bundle savedInstanceState,
PersistableBundle persistentState) {
if (DEBUG) {
Logger.d(TAG,"callActivityOnRestoreInstanceState()Activity activity, Bundle savedInstanceState,\n" +
" PersistableBundle persistentState");
}
mInstrumentation.callActivityOnRestoreInstanceState(activity, savedInstanceState, persistentState);
}
代码示例来源:origin: org.robolectric/shadows-framework
public ActivityController<T> restoreInstanceState(Bundle bundle) {
shadowMainLooper.runPaused(
() -> getInstrumentation().callActivityOnRestoreInstanceState(component, bundle));
return this;
}
代码示例来源:origin: iqiyi/Neptune
void mockActivityOnRestoreInstanceStateIfNeed(Instrumentation instr, Activity activity) {
if (shouldIgnore(activity)) {
return;
}
String id = activity.getIntent().getStringExtra(KEY_RECOVERY_SAVED_INSTANCE_STATE);
if (id != null) {
Bundle mappedSavedInstanceState = mPendingSavedInstanceStateMap.remove(id);
if (mappedSavedInstanceState != null) {
instr.callActivityOnRestoreInstanceState(activity, mappedSavedInstanceState);
}
}
}
代码示例来源:origin: iqiyi/Neptune
@Override
public void callActivityOnRestoreInstanceState(Activity activity, Bundle savedInstanceState) {
if (activity instanceof TransRecoveryActivity0) {
mRecoveryHelper.saveSavedInstanceState(activity, savedInstanceState);
return;
}
if (IntentUtils.isIntentForPlugin(activity.getIntent())) {
String pkgName = IntentUtils.parsePkgAndClsFromIntent(activity.getIntent())[0];
PluginLoadedApk loadedApk = PluginManager.getPluginLoadedApkByPkgName(pkgName);
if (loadedApk != null && savedInstanceState != null) {
savedInstanceState.setClassLoader(loadedApk.getPluginClassLoader());
}
}
mHostInstr.callActivityOnRestoreInstanceState(activity, savedInstanceState);
}
内容来源于网络,如有侵权,请联系作者删除!