[core] Fix rare condiction (#762)

This commit is contained in:
LoveSy 2021-06-22 01:28:31 +08:00 committed by GitHub
parent bcd7f99de5
commit 1cf1c793e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,6 @@ import de.robv.android.xposed.XposedBridge;
public final class DynamicBridge {
private static final ConcurrentHashMap<Executable, LspHooker> hookedInfo = new ConcurrentHashMap<>();
private static final HookerDexMaker dexMaker = new HookerDexMaker();
public static synchronized void hookMethod(Executable hookMethod, XposedBridge.AdditionalHookInfo additionalHookInfo) {
Logger.d("hooking " + hookMethod);
@ -44,6 +43,7 @@ public final class DynamicBridge {
Logger.d("start to generate class for: " + hookMethod);
try {
final HookerDexMaker dexMaker = new HookerDexMaker();
dexMaker.start(hookMethod, additionalHookInfo,
hookMethod.getDeclaringClass().getClassLoader());
hookedInfo.put(hookMethod, dexMaker.getHooker());