Permalink
Browse files

Merge pull request #2 from yemengsky/patch-1

Update HookHelper.java
  • Loading branch information...
2 parents 50d0d2d + a6802ec commit cbe63ea6b70c50e74d3de9f83742f1661df4046b @tiann 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 cbe63ea

Please sign in to comment.