Skip to content

Commit

Permalink
use mutability flag for pending intent
Browse files Browse the repository at this point in the history
  • Loading branch information
sds100 committed Aug 6, 2023
1 parent 23d674e commit f43e970
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,8 @@ class AndroidAppShortcutAdapter(context: Context) : AppShortcutAdapter {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)

try {
val pendingIntent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
PendingIntent.getActivity(ctx, 0, intent, PendingIntent.FLAG_IMMUTABLE)
} else {
PendingIntent.getActivity(ctx, 0, intent, 0)
}
val pendingIntent =
PendingIntent.getActivity(ctx, 0, intent, PendingIntent.FLAG_IMMUTABLE)

pendingIntent.send()
return Success(Unit)
Expand Down

0 comments on commit f43e970

Please sign in to comment.