Xposed: how to block a method call
I am using Xposed to execute some method (for now, just for teaching). I was able to connect the SendTextMessage method (android.telephony.SmsManager), I can do some things before and after the method call, so my question is: can I do something in the previous case because the original method will not be called?
Thank,
+3
source to share
3 answers
There are comments in the source code that say the way to prevent the method from being called is to call MethodHookParam # setThrowable (Throwable) to prevent the function from being called. So take the paras that were passed in beforeHookedMethod and call param.setThrowable (Throwable t)
Note that Throwable is just a superclass for all errors and exceptions in Java, so you should just use Exception or Error as Throwable.
-1
source to share