Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Insert方法下调用被拦截的Log.d未生效 #13

Open
ZLOVE320483 opened this issue Jul 5, 2018 · 1 comment
Open

@Insert方法下调用被拦截的Log.d未生效 #13

ZLOVE320483 opened this issue Jul 5, 2018 · 1 comment

Comments

@ZLOVE320483
Copy link

@Proxy("i")
@TargetClass("android.util.Log")
public static int printLog(String tag, String msg) {
    msg = msg + "----lancet";
    return (int) Origin.call();
}

@TargetClass(value = "android.support.v7.app.AppCompatActivity", scope = Scope.LEAF)
@Insert(value = "onStop", mayCreateSuper = true)
protected void onStop() {
    Log.i("ZLOVE", "hello word");
    Origin.callVoid();
}

打印出来的是 hello word,而不是hello word----lancet

@dieyidezui
Copy link
Contributor

带有 Lancet 注解的类不会被二次注入,建议调整位置,将Log.i 这句放在非 Hook 类内调用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants