Try three times when setting classloader trusted
It may fail because of race, so try more as a temporary workaround
This commit is contained in:
parent
40845b3f74
commit
46558c6bc9
|
|
@ -21,7 +21,14 @@ public class OpenDexFileHooker extends XC_MethodHook {
|
|||
}
|
||||
while (classLoader != null) {
|
||||
if (classLoader == XposedHelpers.class.getClassLoader()) {
|
||||
HookBridge.setTrusted(param.getResult());
|
||||
// it may fail because of race, try more
|
||||
for (int i = 0; i < 3; i++) {
|
||||
try {
|
||||
HookBridge.setTrusted(param.getResult());
|
||||
break;
|
||||
} catch (SecurityException ignored) {
|
||||
}
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
classLoader = classLoader.getParent();
|
||||
|
|
|
|||
Loading…
Reference in New Issue