Permalink
Browse files

Update HookHelper.java

  • Loading branch information...
1 parent 50d0d2d commit a6802ec6b0f1da226fe9caf195bc12457dc9c74c @yemengsky yemengsky committed on GitHub Aug 4, 2016
@@ -16,6 +16,7 @@ public static void attachContext() throws Exception{
Class<?> activityThreadClass = Class.forName("android.app.ActivityThread");
Method currentActivityThreadMethod = activityThreadClass.getDeclaredMethod("currentActivityThread");
currentActivityThreadMethod.setAccessible(true);
+ //currentActivityThread是一个static函数所以可以直接invoke,不需要带实例参数
Object currentActivityThread = currentActivityThreadMethod.invoke(null);
// 拿到原始的 mInstrumentation字段

0 comments on commit a6802ec

Please sign in to comment.