hook Method Advanced
Hook a Java method by providing the target method together with the context object owner and its callback replacement.
Return
The backup of the original method. Should be stored in the owner object.
See also
Parameters
The hooker object to store the context of the hook. Null if replacement is static. The most likely usage is to store the backup method into it so that when replacement is invoked, it can call the original method. Another scenario is that, for example, in Xposed framework, multiple modules can hook the same Java method and the owner can be used to store all the callbacks to allow multiple modules work simultaneously without conflict.
The method you want to hook. Must not be null.
The callback method to the owner object is used to replace the target method. Whenever the target method is invoked, the replacement method will be invoked instead of the original target method. The return type must be the same as the original method and the parameter type must be Object[]. args[0] is the this object for non-static methods and there is NOT null this object placeholder for static methods.