Commit e84a32a9 authored by swift_gan's avatar swift_gan

fix error logic of resolveDexCache

parent bf2c84bb
...@@ -69,14 +69,15 @@ public class HookWrapper { ...@@ -69,14 +69,15 @@ public class HookWrapper {
for (HookEntity hookEntity:hookEntityMap.values()) { for (HookEntity hookEntity:hookEntityMap.values()) {
if (TextUtils.equals(hookEntity.isCtor() ? "<init>" : hookEntity.target.getName(), hookMethodBackup.value()) && samePars(classLoader, field, hookEntity.pars)) { if (TextUtils.equals(hookEntity.isCtor() ? "<init>" : hookEntity.target.getName(), hookMethodBackup.value()) && samePars(classLoader, field, hookEntity.pars)) {
field.setAccessible(true); field.setAccessible(true);
if (hookEntity.backup == null) if (hookEntity.backup == null) {
hookEntity.backup = BackupMethodStubs.getStubMethod(); hookEntity.backup = BackupMethodStubs.getStubMethod();
hookEntity.hookIsStub = true;
hookEntity.resolveDexCache = false;
}
if (hookEntity.backup == null) if (hookEntity.backup == null)
continue; continue;
try { try {
field.set(null, hookEntity.backup); field.set(null, hookEntity.backup);
hookEntity.hookIsStub = true;
hookEntity.resolveDexCache = false;
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
e.printStackTrace(); e.printStackTrace();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment