About use the backup method to call the original method #1028
-
Hello every devs, I want to ask a question about development here. But why in here is invoke by "param.args", not the "args" parameter of the handleHookedMethod function? Isn't “param.args" already subtracted a thisObject? I invoke like you too but the carsh log prompt is one less parameter: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 21 replies
-
If the original method is static, then backup should be invoked by For Xposed interface, |
Beta Was this translation helpful? Give feedback.
If the original method is static, then backup should be invoked by
invoke(null, args)
.If the original method is non-static, then the backup should be invoked by
invoke(thisObject, args)
.For Xposed interface,
thisObject
is always null (unless some modules set it) for static methods. So both invokes can be merged toinvoke(thisObject, args)