File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
app/src/main/java/com/wmods/wppenhacer/xposed/core/devkit Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1406,8 +1406,14 @@ public synchronized static Method getFilterInitMethod(ClassLoader loader) throws
14061406 var methods = dexkit .findMethod (new FindMethod ().matcher (new MethodMatcher ().addInvoke (DexSignUtil .getMethodDescriptor (constructor ))));
14071407 if (methods .isEmpty ()) throw new RuntimeException ("FilterInit method not found" );
14081408 var cFrag = XposedHelpers .findClass ("com.whatsapp.conversationslist.ConversationsFragment" , loader );
1409- var method = methods .stream ().filter (m -> m .getParamCount () == 1 && m .getParamTypes ().get (0 ).getName ().equals (cFrag .getName ())).findFirst ().orElse (null );
1409+ var method = methods .stream ().filter (m -> Arrays . asList ( 1 , 2 ). contains ( m .getParamCount ()) && m .getParamTypes ().get (0 ).getName ().equals (cFrag .getName ())).findFirst ().orElse (null );
14101410 if (method == null ) throw new RuntimeException ("FilterInit method not found 2" );
1411+
1412+ // for 20.xx, it returned with 2 parameter count
1413+ if (method .getParamCount () == 2 ) {
1414+ method = method .getDeclaredClass ().findMethod (FindMethod .create ().matcher (new MethodMatcher ().addInvoke (DexSignUtil .getMethodDescriptor (method .getMethodInstance (loader ))))).singleOrNull ();
1415+ if (method == null ) throw new RuntimeException ("FilterInit method not found 3" );
1416+ }
14111417 return method .getMethodInstance (loader );
14121418 });
14131419 }
You can’t perform that action at this time.
0 commit comments