Skip to content

Commit e672c2f

Browse files
committed
faster flags
1 parent 790a2ad commit e672c2f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Assets/AndroidIl2cppPatchDemo/Script/Bootstrap.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public static void reboot_app()
2424

2525
AndroidJavaObject pm = current_activity.Call<AndroidJavaObject>("getPackageManager");
2626
AndroidJavaObject intent = pm.Call<AndroidJavaObject>("getLaunchIntentForPackage", Application.identifier);
27-
intent.Call<AndroidJavaObject>("setFlags", 0x20000000);//Intent.FLAG_ACTIVITY_SINGLE_TOP
27+
//intent.Call<AndroidJavaObject>("setFlags", 0x20000000);//Intent.FLAG_ACTIVITY_SINGLE_TOP
28+
intent.Call<AndroidJavaObject>("setFlags", 0x04000000 | 0x00008000 | 0x10000000);//Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK
2829

2930
AndroidJavaClass pending_intent = new AndroidJavaClass("android.app.PendingIntent");
3031
AndroidJavaObject content_intent = pending_intent.CallStatic<AndroidJavaObject>("getActivity", current_activity, 0, intent, 0x8000000); //PendingIntent.FLAG_UPDATE_CURRENT = 134217728 [0x8000000]

0 commit comments

Comments
 (0)