fix offset of inline_max_code_units_ in Android11

This commit is contained in:
luojitong 2020-12-23 18:45:55 +08:00 committed by 双草酸酯
parent e10bde00db
commit cf1708f152
1 changed files with 3 additions and 0 deletions

View File

@ -15,6 +15,9 @@ namespace SandHook {
Size calOffset(JNIEnv *jniEnv, art::CompilerOptions *p) override {
if (SDK_INT < ANDROID_N)
return getParentSize() + 1;
if (SDK_INT >= ANDROID_Q) {
return BYTE_POINT + 3 * sizeof(size_t);
}
if (SDK_INT >= ANDROID_O) {
return BYTE_POINT + 5 * sizeof(size_t);
} else {