|
25 | 25 | import org.luckypray.dexkit.DexKitBridge; |
26 | 26 | import org.luckypray.dexkit.query.FindClass; |
27 | 27 | import org.luckypray.dexkit.query.FindMethod; |
| 28 | +import org.luckypray.dexkit.query.enums.OpCodeMatchType; |
28 | 29 | import org.luckypray.dexkit.query.enums.StringMatchType; |
29 | 30 | import org.luckypray.dexkit.query.matchers.ClassMatcher; |
30 | 31 | import org.luckypray.dexkit.query.matchers.MethodMatcher; |
@@ -1113,7 +1114,8 @@ public synchronized static Method loadGetEditMessageMethod(ClassLoader loader) t |
1113 | 1114 | public synchronized static Field loadSetEditMessageField(ClassLoader loader) throws Exception { |
1114 | 1115 | return UnobfuscatorCache.getInstance().getField(loader, () -> { |
1115 | 1116 | var method = findFirstMethodUsingStrings(loader, StringMatchType.Contains, "CoreMessageStore/updateCheckoutMessageWithTransactionInfo"); |
1116 | | - if (method == null) method = findFirstMethodUsingStrings(loader, StringMatchType.Contains, "UPDATE_MESSAGE_ADD_ON_FLAGS_MAIN_SQL"); |
| 1117 | + if (method == null) |
| 1118 | + method = findFirstMethodUsingStrings(loader, StringMatchType.Contains, "UPDATE_MESSAGE_ADD_ON_FLAGS_MAIN_SQL"); |
1117 | 1119 | var classData = dexkit.getClassData(loadFMessageClass(loader)); |
1118 | 1120 | var methodData = dexkit.getMethodData(DexSignUtil.getMethodDescriptor(method)); |
1119 | 1121 | var usingFields = methodData.getUsingFields(); |
@@ -1552,7 +1554,12 @@ public synchronized static Method loadShowDialogStatusMethod(ClassLoader classLo |
1552 | 1554 | return UnobfuscatorCache.getInstance().getMethod(classLoader, () -> { |
1553 | 1555 | var clazz = loadFragmentLoader(classLoader); |
1554 | 1556 | var frag = classLoader.loadClass("androidx.fragment.app.DialogFragment"); |
1555 | | - var result = dexkit.findMethod(new FindMethod().matcher(new MethodMatcher().paramCount(2).addParamType(frag).addParamType(clazz).returnType(void.class).modifiers(Modifier.PUBLIC | Modifier.STATIC))); |
| 1557 | + var result = dexkit.findMethod(FindMethod.create().matcher( |
| 1558 | + MethodMatcher.create().paramCount(2).addParamType(frag).addParamType(clazz) |
| 1559 | + .returnType(void.class).modifiers(Modifier.PUBLIC | Modifier.STATIC) |
| 1560 | + .opNames(List.of("iget-boolean", "if-nez"), OpCodeMatchType.Contains) |
| 1561 | + ) |
| 1562 | + ); |
1556 | 1563 | if (result.isEmpty()) throw new RuntimeException("showDialogStatus not found"); |
1557 | 1564 | return result.get(0).getMethodInstance(classLoader); |
1558 | 1565 | }); |
|
0 commit comments