Commit 2835c895 authored by swift_gan's avatar swift_gan

remove useless flag set

parent 9ba21a36
......@@ -69,7 +69,6 @@ bool doHookWithReplacement(JNIEnv* env,
if (backupMethod != nullptr) {
originMethod->backup(backupMethod);
backupMethod->disableCompilable();
backupMethod->disableInterpreterForO();
if (!backupMethod->isStatic()) {
backupMethod->setPrivate();
}
......@@ -110,10 +109,7 @@ bool doHookWithInline(JNIEnv* env,
hookMethod->disableCompilable();
}
if (SDK_INT >= ANDROID_N) {
originMethod->disableCompilable();
}
originMethod->disableCompilable();
originMethod->flushCache();
SandHook::HookTrampoline* hookTrampoline = trampolineManager.installInlineTrampoline(originMethod, hookMethod, backupMethod);
......@@ -126,11 +122,7 @@ bool doHookWithInline(JNIEnv* env,
//backup
originMethod->backup(backupMethod);
backupMethod->setQuickCodeEntry(hookTrampoline->callOrigin->getCode());
if (SDK_INT >= ANDROID_N) {
backupMethod->disableCompilable();
}
backupMethod->disableInterpreterForO();
backupMethod->disableCompilable();
if (!backupMethod->isStatic()) {
backupMethod->setPrivate();
}
......
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