Revert "Remove workaround for Application#attach"

This reverts commit bc878ec
This commit is contained in:
solohsu 2019-02-20 20:11:30 +08:00
parent 3fb6a478df
commit 56d8126202
1 changed files with 1 additions and 0 deletions

View File

@ -155,6 +155,7 @@ public final class XposedBridge {
* @see #hookAllConstructors
*/
public static XC_MethodHook.Unhook hookMethod(Member hookMethod, XC_MethodHook callback) {
hookMethod = MethodHookUtils.preCheck(hookMethod);
if (!(hookMethod instanceof Method) && !(hookMethod instanceof Constructor<?>)) {
throw new IllegalArgumentException("Only methods and constructors can be hooked: " + hookMethod.toString());
} else if (hookMethod.getDeclaringClass().isInterface()) {