Skip to content

Commit 84de3d9

Browse files
committed
Fix bug in WhatsApp Business
Signed-off-by: Dev4Mod <[email protected]>
1 parent e1d8631 commit 84de3d9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,10 +1725,13 @@ public static Class<?> loadFragmentClass(ClassLoader classLoader) throws Excepti
17251725

17261726
public static Method loadMediaQualitySelectionMethod(ClassLoader classLoader) throws Exception {
17271727
return UnobfuscatorCache.getInstance().getMethod(classLoader, () -> {
1728-
var method = findFirstMethodUsingStrings(classLoader, StringMatchType.Contains, "enable_media_quality_tool");
1729-
if (method == null)
1728+
var methodData = dexkit.findMethod(FindMethod.create().matcher(
1729+
MethodMatcher.create().addUsingString("enable_media_quality_tool").
1730+
returnType(boolean.class)
1731+
));
1732+
if (methodData.isEmpty())
17301733
throw new RuntimeException("MediaQualitySelection method not found");
1731-
return method;
1734+
return methodData.get(0).getMethodInstance(classLoader);
17321735
});
17331736
}
17341737
}

0 commit comments

Comments
 (0)