Skip to content

Commit

Permalink
Adds PendingIntent.FLAG_MUTABLE to bring front PendingIntent
Browse files Browse the repository at this point in the history
  • Loading branch information
ecarrara committed Mar 29, 2023
1 parent d00c096 commit b447e00
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ class BackgroundNotification(
?.setPackage(null)
?.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED)

return if (intent != null) {
return if (intent != null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_MUTABLE)
} else if (intent != null) {
PendingIntent.getActivity(context, 0, intent, 0)
} else {
null
Expand Down

0 comments on commit b447e00

Please sign in to comment.