Skip to content

Commit

Permalink
优化: 尝试修复
Browse files Browse the repository at this point in the history
  • Loading branch information
HChenX committed May 28, 2024
1 parent cf3986c commit 5b21add
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ private static List<AnnotatedElement> 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() 方法
}
Expand Down

0 comments on commit 5b21add

Please sign in to comment.