Commit d4879f15 authored by swift_gan's avatar swift_gan

fix kAccCompileDontBother flag

parent 19b099b0
...@@ -22,7 +22,11 @@ Java_com_swift_sandhook_SandHook_initNative(JNIEnv *env, jclass type, jint sdk) ...@@ -22,7 +22,11 @@ Java_com_swift_sandhook_SandHook_initNative(JNIEnv *env, jclass type, jint sdk)
void disableCompilable(art::mirror::ArtMethod* method) { void disableCompilable(art::mirror::ArtMethod* method) {
uint32_t accessFlag = SandHook::CastArtMethod::accessFlag->get(method); uint32_t accessFlag = SandHook::CastArtMethod::accessFlag->get(method);
accessFlag |= 0x01000000; if (SDK_INT >= ANDROID_O2) {
accessFlag |= 0x02000000;
} else {
accessFlag |= 0x01000000;
}
SandHook::CastArtMethod::accessFlag->set(method, accessFlag); SandHook::CastArtMethod::accessFlag->set(method, accessFlag);
} }
......
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