Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ abstract class ComponentManager : PluginComponentLauncher {

abstract fun getBroadcastInfoList(partKey: String): List<BroadcastInfo>?

override fun startActivity(shadowContext: ShadowContext, pluginIntent: Intent): Boolean {
override fun startActivity(shadowContext: ShadowContext, pluginIntent: Intent, option: Bundle?): Boolean {
return if (pluginIntent.isPluginComponent()) {
shadowContext.superStartActivity(pluginIntent.toActivityContainerIntent())
shadowContext.superStartActivity(pluginIntent.toActivityContainerIntent(), option)
true
} else {
false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public interface PluginComponentLauncher {
* @return <code>true</code>表示该Intent是为了启动插件内Activity的,已经被正确消费了.
* <code>false</code>表示该Intent不是插件内的Activity.
*/
boolean startActivity(ShadowContext shadowContext, Intent intent);
boolean startActivity(ShadowContext shadowContext, Intent intent, Bundle options);

/**
* 启动Activity
Expand All @@ -174,16 +174,21 @@ public interface PluginComponentLauncher {

@Override
public void startActivity(Intent intent) {
startActivity(intent, null);
}

@Override
public void startActivity(Intent intent, Bundle options) {
final Intent pluginIntent = new Intent(intent);
pluginIntent.setExtrasClassLoader(mPluginClassLoader);
final boolean success = mPluginComponentLauncher.startActivity(this, pluginIntent);
final boolean success = mPluginComponentLauncher.startActivity(this, pluginIntent, options);
if (!success) {
super.startActivity(intent);
super.startActivity(intent, options);
}
}

public void superStartActivity(Intent intent) {
super.startActivity(intent);
public void superStartActivity(Intent intent, Bundle options) {
super.startActivity(intent, options);
}

@Override
Expand Down