Skip to content

Commit 1afa984

Browse files
committed
Update Core
1 parent c8a950e commit 1afa984

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

PluginCore/src/com/plugin/core/PluginIntentResolver.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ public static ArrayList<Intent> resolveReceiver(final Intent intent) {
9191
ServiceInfo info = (ServiceInfo) RefInvoker.getFieldObject(msgObj, "android.app.ActivityThread$CreateServiceData", "info");
9292
//通过映射查找
9393
String targetClassName = PluginStubBinding.getBindedPluginServiceName(info.name);
94+
//TODO
95+
//info.applicationInfo = XXX
9496

95-
LogUtil.d("hackServiceName", info.name, info.packageName, info.processName, "targetClassName", targetClassName);
97+
LogUtil.d("hackServiceName", info.name, info.packageName, info.processName, "targetClassName", targetClassName, info.applicationInfo.packageName);
9698

9799
if (targetClassName != null) {
98100
info.name = CLASS_PREFIX + targetClassName;

PluginCore/src/com/plugin/core/PluginLoader.java

+6
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,12 @@ static void ensurePluginInited(PluginDescriptor pluginDescriptor) {
472472
pluginDescriptor.setPluginContext(pluginContext);
473473
pluginDescriptor.setPluginClassLoader(pluginClassLoader);
474474

475+
// try {
476+
// ActivityThread.installPackageInfo(PluginLoader.getApplicatoin(), pluginDescriptor.getPackageName());
477+
// } catch (ClassNotFoundException e) {
478+
// e.printStackTrace();
479+
// }
480+
475481
callPluginApplicationOnCreate(pluginDescriptor);
476482

477483
LogUtil.e("初始化插件" + pluginDescriptor.getPackageName() + "完成");

PluginCore/src/com/plugin/core/app/ActivityThread.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public static void wrapInstrumentation() {
162162
// 42 parent = baseParent;
163163
// 43 }
164164
//
165-
public static void getPackageInfo(Context hostContext, String pluginId) throws ClassNotFoundException {
165+
public static void installPackageInfo(Context hostContext, String pluginId) throws ClassNotFoundException {
166166
enableLog();
167167
Object applicationLoaders = RefInvoker.invokeStaticMethod("android.app.ApplicationLoaders", "getDefault", (Class[]) null, (Object[]) null);
168168
Map mLoaders = (Map)RefInvoker.getFieldObject(applicationLoaders, "android.app.ApplicationLoaders", "mLoaders");

0 commit comments

Comments
 (0)