@@ -865,6 +865,27 @@ public synchronized static Method loadOnChangeStatus(ClassLoader loader) throws
865
865
return UnobfuscatorCache .getInstance ().getMethod (loader , () -> {
866
866
Method method = findFirstMethodUsingStrings (loader , StringMatchType .Contains , "ConversationViewFiller/setParentGroupProfilePhoto" );
867
867
if (method == null ) throw new Exception ("OnChangeStatus method not found" );
868
+
869
+ // for 19.xx, the current implementation returns wrong method
870
+ if (method .getParameterCount () < 6 ) {
871
+ ClassData declaringClassData = dexkit .getClassData (method .getDeclaringClass ());
872
+ if (declaringClassData == null ) throw new Exception ("OnChangeStatus method not found" );
873
+
874
+ Class <?> arg1Class = findFirstClassUsingStrings (loader , StringMatchType .Contains , "problematic contact:" );
875
+ MethodDataList methodData = declaringClassData .findMethod (
876
+ FindMethod .create ().matcher (MethodMatcher .create ().paramCount (6 , 8 )));
877
+
878
+ for (var methodItem : methodData ) {
879
+ var paramTypes = methodItem .getParamTypes ();
880
+
881
+ if (paramTypes .get (0 ).getInstance (loader ) == arg1Class &&
882
+ paramTypes .get (1 ).getInstance (loader ) == arg1Class ) {
883
+ method = methodItem .getMethodInstance (loader );
884
+ break ;
885
+ }
886
+ }
887
+ }
888
+
868
889
return method ;
869
890
});
870
891
}
@@ -1397,7 +1418,7 @@ public synchronized static Method loadOnPlaybackFinished(ClassLoader classLoader
1397
1418
1398
1419
public synchronized static Method loadNextStatusRunMethod (ClassLoader classLoader ) throws Exception {
1399
1420
return UnobfuscatorCache .getInstance ().getMethod (classLoader , () -> {
1400
- var methodList = dexkit .findMethod (new FindMethod ().matcher (new MethodMatcher ().addUsingString ("SequentialVoiceMemoPlayer/ playMiddleTone" ).name ("run" )));
1421
+ var methodList = dexkit .findMethod (new FindMethod ().matcher (new MethodMatcher ().addUsingString ("playMiddleTone" ).name ("run" )));
1401
1422
if (methodList .isEmpty ()) throw new RuntimeException ("RunNextStatus method not found" );
1402
1423
return methodList .get (0 ).getMethodInstance (classLoader );
1403
1424
});
0 commit comments