Skip to content

Commit 6c50003

Browse files
committed
fix media quality
1 parent b1317a6 commit 6c50003

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/src/main/java/com/wmods/wppenhacer/xposed/features/media/MediaQuality.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.wmods.wppenhacer.xposed.core.Feature;
1212
import com.wmods.wppenhacer.xposed.core.devkit.Unobfuscator;
1313
import com.wmods.wppenhacer.xposed.features.general.Others;
14+
import com.wmods.wppenhacer.xposed.utils.ReflectionUtils;
1415

1516
import org.json.JSONObject;
1617

@@ -39,7 +40,12 @@ public void doHook() throws Exception {
3940
XposedBridge.hookMethod(jsonProperty, new XC_MethodHook() {
4041
@Override
4142
protected void afterHookedMethod(MethodHookParam param) throws Throwable {
42-
if ((int) param.args[0] == 5550) {
43+
var index = ReflectionUtils.findIndexOfType(param.args, Integer.class);
44+
if (index == -1) {
45+
logDebug("PropsJson: index int not found");
46+
return;
47+
}
48+
if ((int) param.args[index] == 5550) {
4349
var json = (JSONObject) param.getResult();
4450
for (int i = 0; i < json.length(); i++) {
4551
var key = (String) json.names().opt(i);

0 commit comments

Comments
 (0)