File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -1543,17 +1543,21 @@ public synchronized static Method loadSendAudioTypeMethod(ClassLoader classLoade
15431543
15441544 public synchronized static Field loadOriginFMessageField (ClassLoader classLoader ) throws Exception {
15451545 return UnobfuscatorCache .getInstance ().getField (classLoader , () -> {
1546- var result = dexkit .findMethod (new FindMethod ().matcher (new MethodMatcher ().addUsingString ("audio/ogg; codecs=opu" ).paramCount (0 ).returnType (boolean .class )));
1547- var clazz = loadFMessageClass (classLoader );
1548- if (result .isEmpty ()) throw new RuntimeException ("OriginFMessageField not found" );
1549- var fields = result .get (0 ).getUsingFields ();
1550- for (var field : fields ) {
1551- var f = field .getField ().getFieldInstance (classLoader );
1552- if (f .getDeclaringClass ().equals (clazz )) {
1553- return f ;
1546+ var result = dexkit .findMethod (FindMethod .create ().matcher (MethodMatcher .create ().addUsingString ("audio/ogg; codecs=opu" ).returnType (boolean .class )));
1547+ var FMessageClass = loadFMessageClass (classLoader );
1548+ if (result .isEmpty ()) {
1549+ throw new RuntimeException ("OriginFMessageField not found" );
1550+ }
1551+ for (var clazz : result ) {
1552+ var fields = clazz .getUsingFields ();
1553+ for (var field : fields ) {
1554+ var f = field .getField ().getFieldInstance (classLoader );
1555+ if (FMessageClass .isAssignableFrom (f .getDeclaringClass ())) {
1556+ return f ;
1557+ }
15541558 }
15551559 }
1556- throw new RuntimeException ("OriginFMessageField not found" );
1560+ throw new RuntimeException ("OriginFMessageField field not found" );
15571561 });
15581562 }
15591563
You can’t perform that action at this time.
0 commit comments