Skip to content

Commit 3eb5089

Browse files
author
维术
committed
[Misc]: Becuase of the epic improvement, remove restricts for wexposed.
1 parent 8a7250f commit 3eb5089

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import android.content.Intent;
77
import android.content.ServiceConnection;
88
import android.content.pm.ApplicationInfo;
9-
import android.graphics.Bitmap;
109
import android.os.Build;
1110
import android.os.IBinder;
1211
import android.text.TextUtils;
@@ -30,7 +29,6 @@
3029
import java.lang.reflect.Constructor;
3130
import java.lang.reflect.Field;
3231
import java.lang.reflect.Member;
33-
import java.lang.reflect.Method;
3432
import java.util.HashMap;
3533
import java.util.HashSet;
3634
import java.util.Map;
@@ -68,21 +66,14 @@ public class ExposedBridge {
6866
private static final String VERSION_KEY = "version";
6967
private static boolean SYSTEM_CLASSLOADER_INJECT = false;
7068

71-
private static final String WECHAT_PACKAGE = "com.tencent.mm";
72-
7369
private static Pair<String, Set<String>> lastModuleList = Pair.create(null, null);
7470
private static Map<ClassLoader, ClassLoader> exposedClassLoaderMap = new HashMap<>();
7571
private static ClassLoader xposedClassLoader;
7672

77-
private static volatile boolean isWeChat = false;
78-
7973
private static Context appContext;
8074
private static ModuleLoadListener sModuleLoadListener = new ModuleLoadListener() {
8175
@Override
8276
public void onLoadingModule(String moduleClassName, ApplicationInfo applicationInfo, ClassLoader appClassLoader) {
83-
if (WECHAT_PACKAGE.equalsIgnoreCase(applicationInfo.packageName)) {
84-
isWeChat = true;
85-
}
8677
}
8778

8879
@Override
@@ -263,22 +254,6 @@ public static ModuleLoadResult loadModule(final String moduleApkPath, String mod
263254
}
264255

265256
private static boolean ignoreHooks(Member member) {
266-
if (isWeChat) {
267-
if (member instanceof Method) {
268-
if (((Method) member).getReturnType() == Bitmap.class) {
269-
log("i h: " + ((Method) member).toGenericString());
270-
return true;
271-
}
272-
if ("closeChatting".equalsIgnoreCase(member.getName())) {
273-
log("i h: " + ((Method) member).toGenericString());
274-
return true;
275-
}
276-
if (member.getDeclaringClass().getName().contains("notification")) {
277-
log("i h: " + ((Method) member).toGenericString());
278-
return true;
279-
}
280-
}
281-
}
282257
return false;
283258
}
284259

0 commit comments

Comments
 (0)