Skip to content

Commit fbcfaf5

Browse files
committed
Fix media quality not working in WA 2.25.5.72
Signed-off-by: Dev4Mod <[email protected]>
1 parent a6c297a commit fbcfaf5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1814,13 +1814,14 @@ public static Class<?> loadFragmentClass(ClassLoader classLoader) throws Excepti
18141814

18151815
public static Method loadMediaQualitySelectionMethod(ClassLoader classLoader) throws Exception {
18161816
return UnobfuscatorCache.getInstance().getMethod(classLoader, () -> {
1817-
var methodData = dexkit.findMethod(FindMethod.create().matcher(
1818-
MethodMatcher.create().addUsingString("enable_media_quality_tool").
1817+
var classData = dexkit.getClassData("com.whatsapp.mediacomposer.MediaComposerActivity");
1818+
var methodData = Objects.requireNonNull(classData).findMethod(FindMethod.create().matcher(
1819+
MethodMatcher.create().addUsingNumber(6033).
18191820
returnType(boolean.class)
18201821
));
18211822
if (methodData.isEmpty())
18221823
throw new RuntimeException("MediaQualitySelection method not found");
1823-
return methodData.get(0).getMethodInstance(classLoader);
1824+
return methodData.single().getMethodInstance(classLoader);
18241825
});
18251826
}
18261827

0 commit comments

Comments
 (0)