androidxposed-framework

Xposed: how to block a method call


I'm using Xposed to do some method hooking (for now, just for learning). I've manged to hook the method SendTextMessage (android.telephony.SmsManager), i can do some things before the call and after the call of the method, so my question is, can i do something in the before that will cause the original method not be called?

Thanks,


Solution

  • Use this somewhere in a "before" hook to prevent call to original method

    param.setResult(null);
    

    (In a "after" hook it only changes result of original method because it was executed yet)