Skip to content

Commit

Permalink
Merge pull request #622 from pennlabs/flag-mutability-fix
Browse files Browse the repository at this point in the history
Specified PendingIntent Mutability
  • Loading branch information
baronhsieh2005 authored Aug 31, 2024
2 parents d758c96 + 90edc61 commit 03dc7a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class LaundryBroadcastReceiver : BroadcastReceiver() {
notificationManager.notify(notificationID, mBuilder.build())

// cancel intent after notification/alarm goes off
val fromIntent = PendingIntent.getBroadcast(context, id, intent, PendingIntent.FLAG_NO_CREATE)
val fromIntent = PendingIntent.getBroadcast(context, id, intent, PendingIntent.FLAG_NO_CREATE or PendingIntent.FLAG_IMMUTABLE)
fromIntent?.cancel()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ class HomeAdapter(
mContext,
0,
share,
PendingIntent.FLAG_CANCEL_CURRENT,
PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_IMMUTABLE,
),
)
customTabsIntent = builder?.build()
Expand Down Expand Up @@ -567,7 +567,7 @@ class HomeAdapter(
mContext,
0,
share,
PendingIntent.FLAG_CANCEL_CURRENT,
PendingIntent.FLAG_CANCEL_CURRENT or PendingIntent.FLAG_IMMUTABLE,
),
)
customTabsIntent = builder?.build()
Expand Down

0 comments on commit 03dc7a7

Please sign in to comment.