File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
app/src/main/java/com/wmods/wppenhacer/xposed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1752,4 +1752,11 @@ public static synchronized Class loadAbstractMediaMessageClass(ClassLoader loade
17521752 });
17531753 }
17541754
1755+ public static Class <?> loadFragmentClass (ClassLoader classLoader ) throws Exception {
1756+ return UnobfuscatorCache .getInstance ().getClass (classLoader , () -> {
1757+ var clazz = findFirstClassUsingStrings (classLoader , StringMatchType .Contains , "mFragmentId=#" );
1758+ if (clazz == null ) throw new RuntimeException ("Fragment class not found" );
1759+ return clazz ;
1760+ });
1761+ }
17551762}
Original file line number Diff line number Diff line change @@ -177,7 +177,6 @@ private void hookTabName() throws Exception {
177177 XposedBridge .hookMethod (tabNameMethod , new XC_MethodHook () {
178178 @ Override
179179 protected void beforeHookedMethod (MethodHookParam param ) throws Throwable {
180- super .beforeHookedMethod (param );
181180 var tab = (int ) param .args [0 ];
182181 if (tab == GROUPS ) {
183182 param .setResult (UnobfuscatorCache .getInstance ().getString ("groups" ));
@@ -197,7 +196,7 @@ private void hookTabInstance(Class<?> cFrag) throws Exception {
197196
198197 var pattern = Pattern .compile ("android:switcher:\\ d+:(\\ d+)" );
199198
200- Class <?> FragmentClass = classLoader . loadClass ( "androidx.fragment.app.Fragment" );
199+ Class <?> FragmentClass = Unobfuscator . loadFragmentClass ( classLoader );
201200
202201 XposedBridge .hookMethod (recreateFragmentMethod , new XC_MethodHook () {
203202 @ Override
You can’t perform that action at this time.
0 commit comments