|
6 | 6 | import android.content.Intent; |
7 | 7 | import android.content.ServiceConnection; |
8 | 8 | import android.content.pm.ApplicationInfo; |
9 | | -import android.graphics.Bitmap; |
10 | 9 | import android.os.Build; |
11 | 10 | import android.os.IBinder; |
12 | 11 | import android.text.TextUtils; |
|
30 | 29 | import java.lang.reflect.Constructor; |
31 | 30 | import java.lang.reflect.Field; |
32 | 31 | import java.lang.reflect.Member; |
33 | | -import java.lang.reflect.Method; |
34 | 32 | import java.util.HashMap; |
35 | 33 | import java.util.HashSet; |
36 | 34 | import java.util.Map; |
@@ -68,21 +66,14 @@ public class ExposedBridge { |
68 | 66 | private static final String VERSION_KEY = "version"; |
69 | 67 | private static boolean SYSTEM_CLASSLOADER_INJECT = false; |
70 | 68 |
|
71 | | - private static final String WECHAT_PACKAGE = "com.tencent.mm"; |
72 | | - |
73 | 69 | private static Pair<String, Set<String>> lastModuleList = Pair.create(null, null); |
74 | 70 | private static Map<ClassLoader, ClassLoader> exposedClassLoaderMap = new HashMap<>(); |
75 | 71 | private static ClassLoader xposedClassLoader; |
76 | 72 |
|
77 | | - private static volatile boolean isWeChat = false; |
78 | | - |
79 | 73 | private static Context appContext; |
80 | 74 | private static ModuleLoadListener sModuleLoadListener = new ModuleLoadListener() { |
81 | 75 | @Override |
82 | 76 | public void onLoadingModule(String moduleClassName, ApplicationInfo applicationInfo, ClassLoader appClassLoader) { |
83 | | - if (WECHAT_PACKAGE.equalsIgnoreCase(applicationInfo.packageName)) { |
84 | | - isWeChat = true; |
85 | | - } |
86 | 77 | } |
87 | 78 |
|
88 | 79 | @Override |
@@ -263,22 +254,6 @@ public static ModuleLoadResult loadModule(final String moduleApkPath, String mod |
263 | 254 | } |
264 | 255 |
|
265 | 256 | 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 | | - } |
282 | 257 | return false; |
283 | 258 | } |
284 | 259 |
|
|
0 commit comments