Skip to content

Commit

Permalink
fix: Find another method to detect StatusPlaybackView field
Browse files Browse the repository at this point in the history
  • Loading branch information
frknkrc44 committed Feb 11, 2025
1 parent 0667f7c commit 0d5fc7a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.luckypray.dexkit.query.enums.StringMatchType;
import org.luckypray.dexkit.query.matchers.ClassMatcher;
import org.luckypray.dexkit.query.matchers.MethodMatcher;
import org.luckypray.dexkit.query.matchers.base.IntRange;
import org.luckypray.dexkit.query.matchers.base.OpCodesMatcher;
import org.luckypray.dexkit.result.ClassData;
import org.luckypray.dexkit.result.ClassDataList;
Expand Down Expand Up @@ -770,6 +771,11 @@ public synchronized static Field loadStatusPlaybackViewField(ClassLoader loader)
ClassDataList classView = dexkit.findClass(FindClass.create().matcher(
ClassMatcher.create().methodCount(1).addFieldForType(class1)
));
if (classView.isEmpty()) classView = dexkit.findClass(FindClass.create().matcher(
ClassMatcher.create().methodCount(1, 2)
.addMethod(MethodMatcher.create().paramTypes(View.class, boolean.class, boolean.class))
.addFieldForType(class1)
));
if (classView.isEmpty()) throw new Exception("StatusPlaybackView field not found");
Class<?> clsViewStatus = classView.get(0).getInstance(loader);
Class<?> class2 = XposedHelpers.findClass("com.whatsapp.status.playback.fragment.StatusPlaybackBaseFragment", loader);
Expand Down

0 comments on commit 0d5fc7a

Please # to comment.