Skip to content

Commit afeba53

Browse files
committed
FixBug
1 parent a7c4b87 commit afeba53

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,12 @@ public class PluginIntentResolver {
8787
//通过映射查找
8888
String targetClassName = PluginStubBinding.getBindedPluginServiceName(info.name);
8989

90-
LogUtil.d("hackServiceName", info.name,info.packageName, info.processName, "targetClassName", targetClassName);
90+
LogUtil.d("hackServiceName", info.name, info.packageName, info.processName, "targetClassName", targetClassName);
9191

9292
if (targetClassName != null) {
9393
info.name = prefix + targetClassName;
94+
} else {
95+
LogUtil.d("hackServiceName 没有找到映射关系, 说明是宿主service(也可能是映射表出了异常)", info.name);
9496
}
9597
return targetClassName;
9698
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ private static void loadStubService() {
157157
HashMap<String, String> mapping = restore();
158158
if (mapping != null) {
159159
serviceMapping.putAll(mapping);
160-
save(serviceMapping);
161160
}
161+
save(serviceMapping);
162162
}
163163
}
164164

@@ -223,7 +223,7 @@ public static String bindStubService(String pluginServiceClassName) {
223223
if (entry.getValue() == null) {
224224
if (idleStubServiceName == null) {
225225
idleStubServiceName = entry.getKey();
226-
//这里找到空闲的idleStubServiceName以后,还需继续遍历,用来检查是否pluginActivityClassName已经绑定过了
226+
//这里找到空闲的idleStubServiceName以后,还需继续遍历,用来检查是否pluginServiceClassName已经绑定过了
227227
}
228228
} else if (pluginServiceClassName.equals(entry.getValue())) {
229229
//已经绑定过,直接返回
@@ -254,7 +254,7 @@ public static void unBindStubService(String pluginServiceName) {
254254
LogUtil.d("回收绑定", entry.getKey(), entry.getValue());
255255
serviceMapping.put(entry.getKey(), null);
256256
save(serviceMapping);
257-
entry.getKey();
257+
break;
258258
}
259259
}
260260
}

0 commit comments

Comments
 (0)