[core] Only clear precompile on R or above

This commit is contained in:
LoveSy 2021-03-20 19:46:42 +08:00 committed by LoveSy
parent a08c5402bc
commit 2d8a9932f2
1 changed files with 2 additions and 1 deletions

View File

@ -42,7 +42,8 @@ namespace {
uint32_t access_flags = read32((char *) method + OFFSET_access_flags_in_ArtMethod);
LOGI("setNonCompilable: access flags is 0x%x", access_flags);
access_flags |= kAccCompileDontBother;
access_flags &= ~kAccPreCompiled;
if (SDKVersion >= __ANDROID_API_R__)
access_flags &= ~kAccPreCompiled;
write32((char *) method + OFFSET_access_flags_in_ArtMethod, access_flags);
}