[core] Do not allow hooking inner methods (#846)
This commit is contained in:
parent
10a2ae56a6
commit
36a1fe03e7
|
|
@ -174,6 +174,8 @@ public final class XposedBridge {
|
|||
}*/
|
||||
else if (Modifier.isAbstract(hookMethod.getModifiers())) {
|
||||
throw new IllegalArgumentException("Cannot hook abstract methods: " + hookMethod.toString());
|
||||
} else if (hookMethod.getDeclaringClass().getClassLoader() == XposedBridge.class.getClassLoader()) {
|
||||
throw new IllegalArgumentException("Do not allow hooking inner methods");
|
||||
}
|
||||
|
||||
Executable targetMethod = (Executable) hookMethod;
|
||||
|
|
|
|||
Loading…
Reference in New Issue