Skip to content

Commit 2e91a1b

Browse files
committed
Use PendingIntent.FLAG_IMMUTABLE flag for our intents
Required since we target Android 12+ API: https://developer.android.com/guide/components/intents-filters#DeclareMutabilityPendingIntent
1 parent a87bbe3 commit 2e91a1b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/java/com/mxt/anitrend/util/NotificationUtil.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class NotificationUtil(
4444
context,
4545
defaultNotificationId,
4646
targetActivity,
47-
PendingIntent.FLAG_UPDATE_CURRENT
47+
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
4848
)
4949
}
5050

@@ -57,7 +57,7 @@ class NotificationUtil(
5757
context,
5858
action.hashCode(),
5959
intent,
60-
PendingIntent.FLAG_UPDATE_CURRENT
60+
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
6161
)
6262
}
6363

0 commit comments

Comments
 (0)