File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
app/src/main/java/com/wmods/wppenhacer/xposed/features/customization Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -201,9 +201,14 @@ private void hookTabInstance(Class<?> cFrag) throws Exception {
201201 XposedBridge .hookMethod (recreateFragmentMethod , new XC_MethodHook () {
202202 @ Override
203203 protected void afterHookedMethod (MethodHookParam param ) throws Throwable {
204- var bundle = (Bundle ) param .args [0 ];
205- var state = bundle .getParcelable ("state" );
206- var string = state .toString ();
204+ var string = "" ;
205+ if (param .args [0 ] instanceof Bundle bundle ) {
206+ var state = bundle .getParcelable ("state" );
207+ if (state == null ) return ;
208+ string = state .toString ();
209+ } else {
210+ string = param .args [2 ].toString ();
211+ }
207212 var matcher = pattern .matcher (string );
208213 if (matcher .find ()) {
209214 var tabId = Integer .parseInt (matcher .group (1 ));
You can’t perform that action at this time.
0 commit comments