You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Merge pull request #78175 from phil-hudson/fix-#78105
Android: Set pending intent flag to stop insta-crash
This commit is contained in:
@@ -711,8 +711,14 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC
|
|||||||
Intent notifierIntent = new Intent(activity, activity.getClass());
|
Intent notifierIntent = new Intent(activity, activity.getClass());
|
||||||
notifierIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
notifierIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||||
|
|
||||||
PendingIntent pendingIntent = PendingIntent.getActivity(activity, 0,
|
PendingIntent pendingIntent;
|
||||||
notifierIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
|
pendingIntent = PendingIntent.getActivity(activity, 0,
|
||||||
|
notifierIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
|
||||||
|
} else {
|
||||||
|
pendingIntent = PendingIntent.getActivity(activity, 0,
|
||||||
|
notifierIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
}
|
||||||
|
|
||||||
int startResult;
|
int startResult;
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user