Skip to content

Commit 0fb1f6c

Browse files
author
weishu.tws
committed
ignore wechat push process's hook.
1 parent 9696683 commit 0fb1f6c

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

exposed-core/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies {
3131
}
3232

3333
group = 'me.weishu.exposed'
34-
version = '0.5.6'
34+
version = '0.5.7'
3535

3636
apply plugin: 'com.novoda.bintray-release'
3737

exposed-core/src/main/java/me/weishu/exposed/ExposedBridge.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public static synchronized ClassLoader getXposedClassLoader(ClassLoader hostClas
160160
public static ModuleLoadResult loadModule(final String moduleApkPath, String moduleOdexDir, String moduleLibPath,
161161
final ApplicationInfo currentApplicationInfo, ClassLoader appClassLoader) {
162162

163-
if (isXposedInstaller(currentApplicationInfo)) {
163+
if (filterApplication(currentApplicationInfo)) {
164164
return ModuleLoadResult.IGNORED;
165165
}
166166

@@ -289,6 +289,24 @@ private static boolean isXposedInstaller(ApplicationInfo applicationInfo) {
289289
return XPOSED_INSTALL_PACKAGE.equals(applicationInfo.packageName);
290290
}
291291

292+
private static boolean filterApplication(ApplicationInfo applicationInfo) {
293+
if (applicationInfo == null) {
294+
return true;
295+
}
296+
297+
if (isXposedInstaller(applicationInfo)) {
298+
return true;
299+
}
300+
301+
if (decodeFromBase64("Y29tLnRlbmNlbnQubW06cHVzaA==").equalsIgnoreCase(applicationInfo.processName)) {
302+
// com.tencent.mm:push
303+
XposedBridge.log("ignore process for wechat push.");
304+
return true;
305+
}
306+
307+
return false;
308+
}
309+
292310
private static void initForXposedInstaller(Context context, ApplicationInfo applicationInfo, ClassLoader appClassLoader) {
293311
if (!isXposedInstaller(applicationInfo)) {
294312
return;

0 commit comments

Comments
 (0)