From fc9fb05b7c79cbf5c8f0498b60c0ef58bb00895d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=97=E5=AE=AB=E9=9B=AA=E7=8F=8A?= Date: Sun, 10 Oct 2021 02:25:58 +0800 Subject: [PATCH] [core] Use latest version by default to support SDK 32(#1249) --- core/src/main/cpp/external/yahfa/src/HookMain.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/main/cpp/external/yahfa/src/HookMain.cpp b/core/src/main/cpp/external/yahfa/src/HookMain.cpp index 0997d3b7..2b43881a 100644 --- a/core/src/main/cpp/external/yahfa/src/HookMain.cpp +++ b/core/src/main/cpp/external/yahfa/src/HookMain.cpp @@ -114,6 +114,8 @@ namespace yahfa { env->DeleteLocalRef(classExecutable); LOGI("init to SDK %d", sdkVersion); switch (sdkVersion) { + default: + LOGE("not compatible with SDK %d", sdkVersion); case __ANDROID_API_S__: OFFSET_entry_point_from_quick_compiled_code_in_ArtMethod = roundUpToPtrSize(4 * 3 + 2 * 2) + pointer_size; @@ -132,9 +134,6 @@ namespace yahfa { roundUpToPtrSize(4 * 4 + 2 * 2) + pointer_size * 2; ArtMethodSize = roundUpToPtrSize(4 * 4 + 2 * 2) + pointer_size * 3; break; - default: - LOGE("not compatible with SDK %d", sdkVersion); - break; } setupTrampoline();