Skip to content

Commit

Permalink
Merge pull request Baseflow#849 from valentin-debris/fix/android12-fl…
Browse files Browse the repository at this point in the history
…ag-immutable

Add flag immutable for intent
  • Loading branch information
martijn00 authored Feb 18, 2022
2 parents ae5e649 + 89e4451 commit 0c4487b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion MediaManager/Platforms/Android/MediaManagerImplementation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ public virtual PendingIntent BuildSessionActivityPendingIntent()
sessionIntent = new Intent(Context, activity.GetType());
else
sessionIntent = Context.PackageManager.GetLaunchIntentForPackage(Context.PackageName);
return PendingIntent.GetActivity(Context, 0, sessionIntent, 0);

PendingIntentFlags flag = 0;
if (Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.M) flag = PendingIntentFlags.Immutable;

return PendingIntent.GetActivity(Context, 0, sessionIntent, flag);
}

public override Dictionary<string, string> RequestHeaders
Expand Down

0 comments on commit 0c4487b

Please sign in to comment.