Skip to content

Commit 2ec6a83

Browse files
authored
Merge pull request #111 from Blank517/master
Fix TextStatusComposer2 class not found
2 parents 1c70ada + 9b17e7c commit 2ec6a83

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit/Unobfuscator.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,8 +1533,16 @@ public synchronized static Method loadTextStatusComposer2(ClassLoader classLoade
15331533
ClassMatcher.create().addUsingString("*").
15341534
addMethod(MethodMatcher.create().paramCount(1).addParamType(TextDataClass))
15351535
));
1536-
if (result.isEmpty())
1537-
throw new RuntimeException("TextStatusComposer2 class not found");
1536+
if (result.isEmpty()) {
1537+
result = dexkit.findClass(FindClass.create().matcher(
1538+
ClassMatcher.create().addUsingString("ViewOnce messages can not be forwarded").
1539+
addMethod(MethodMatcher.create().paramCount(1).addParamType(TextDataClass))
1540+
));
1541+
if (result.isEmpty()) {
1542+
throw new RuntimeException("TextStatusComposer2 class not found");
1543+
}
1544+
}
1545+
15381546
var foundClass = result.get(0).getInstance(classLoader);
15391547
var resultMethod = ReflectionUtils.findMethodUsingFilter(foundClass, method -> method.getParameterCount() == 1 && method.getParameterTypes()[0] == TextDataClass);
15401548
if (resultMethod != null)

0 commit comments

Comments
 (0)