From 5b21add15e675418ccbbf3408da67d1770d497a1 Mon Sep 17 00:00:00 2001 From: HChenX Date: Tue, 28 May 2024 22:51:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96:=20=E5=B0=9D=E8=AF=95?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/sevtinge/hyperceiler/module/base/dexkit/DexKit.java | 3 ++- .../module/hook/mediaeditor/UnlockCustomPhotoFrames.kt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/base/dexkit/DexKit.java b/app/src/main/java/com/sevtinge/hyperceiler/module/base/dexkit/DexKit.java index 9e47a0d565..122efa7251 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/base/dexkit/DexKit.java +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/base/dexkit/DexKit.java @@ -474,7 +474,8 @@ private static List getFileCache(String tag, IDexKit iDexKit, } @NotNull - private static Class getClass(String name, ClassLoader classLoader) { + private static Class getClass(@Nullable String name, ClassLoader classLoader) { + if (name == null) throwRuntime("str is null, cant get class!!"); try { return switch (name) { case "int" -> int.class; diff --git a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/mediaeditor/UnlockCustomPhotoFrames.kt b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/mediaeditor/UnlockCustomPhotoFrames.kt index f73ba108ed..7a79dc7c58 100644 --- a/app/src/main/java/com/sevtinge/hyperceiler/module/hook/mediaeditor/UnlockCustomPhotoFrames.kt +++ b/app/src/main/java/com/sevtinge/hyperceiler/module/hook/mediaeditor/UnlockCustomPhotoFrames.kt @@ -73,7 +73,7 @@ object UnlockCustomPhotoFrames : BaseHook() { override fun init() { // 为了减少查询次数,这玩意写得好懵圈.png - val publicC = DexKit.createCache("PC", publicA.toMethodDataList().filter { methodData -> + val publicC = DexKit.createCache("PC", publicA?.toMethodDataList()?.filter { methodData -> methodData.usingFields.any { it.field.typeName == "boolean" // 1.6.3.5 通过此条件应该只会返回 b() 方法 }