Skip to content

Commit

Permalink
Optimized newActivity().
Browse files Browse the repository at this point in the history
  • Loading branch information
superqiaopu committed May 9, 2018
1 parent 2738630 commit ad024b1
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,13 @@ public Activity newActivity(ClassLoader cl, String className, Intent intent) thr
try {
cl.loadClass(className);
} catch (ClassNotFoundException e) {
LoadedPlugin plugin = this.mPluginManager.getLoadedPlugin(intent);
String targetClassName = PluginUtil.getTargetActivity(intent);
ComponentName component = PluginUtil.getComponent(intent);
LoadedPlugin plugin = this.mPluginManager.getLoadedPlugin(component);
String targetClassName = component.getClassName();

Log.i(TAG, String.format("newActivity[%s : %s]", className, targetClassName));
Log.i(TAG, String.format("newActivity[%s : %s/%s]", className, component.getPackageName(), targetClassName));

if (targetClassName != null) {
if (plugin != null) {
Activity activity = mBase.newActivity(plugin.getClassLoader(), targetClassName, intent);
activity.setIntent(intent);

Expand Down

0 comments on commit ad024b1

Please sign in to comment.