Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private static CharSequence getTitle(JSONObject fcmJson) {
}

private static PendingIntent getNewDismissActionPendingIntent(int requestCode, Intent intent) {
return PendingIntent.getBroadcast(currentContext, requestCode, intent, PendingIntent.FLAG_UPDATE_CURRENT);
return PendingIntent.getBroadcast(currentContext, requestCode, intent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
}

private static Intent getNewBaseDismissIntent(int notificationId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class GenerateNotificationOpenIntent(
requestCode: Int,
oneSignalIntent: Intent,
): PendingIntent? {
val flags = PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
val launchIntent = getIntentVisible()
?:
// Even though the default app open action is disabled we still need to attach OneSignal's
Expand All @@ -71,7 +72,7 @@ class GenerateNotificationOpenIntent(
context,
requestCode,
oneSignalIntent,
PendingIntent.FLAG_UPDATE_CURRENT
flags
)


Expand All @@ -84,7 +85,7 @@ class GenerateNotificationOpenIntent(
context,
requestCode,
arrayOf(launchIntent, oneSignalIntent),
PendingIntent.FLAG_UPDATE_CURRENT
flags
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private PendingIntent syncServicePendingIntent(Context context) {
context,
getSyncTaskId(),
new Intent(context, getSyncServicePendingIntentClass()),
PendingIntent.FLAG_UPDATE_CURRENT
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE
);
}

Expand Down