Skip to content

Commit fa83697

Browse files
committed
lets make those pendingintents mutable
1 parent bf2f488 commit fa83697

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/src/main/kotlin/com/simplemobiletools/smsmessenger/extensions/Context.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -746,15 +746,15 @@ fun Context.showMessageNotification(address: String, body: String, threadId: Lon
746746
putExtra(THREAD_ID, threadId)
747747
}
748748

749-
val pendingIntent = PendingIntent.getActivity(this, threadId.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
749+
val pendingIntent = PendingIntent.getActivity(this, threadId.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)
750750
val summaryText = getString(R.string.new_message)
751751
val markAsReadIntent = Intent(this, MarkAsReadReceiver::class.java).apply {
752752
action = MARK_AS_READ
753753
putExtra(THREAD_ID, threadId)
754754
}
755755

756756
val markAsReadPendingIntent =
757-
PendingIntent.getBroadcast(this, threadId.hashCode(), markAsReadIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
757+
PendingIntent.getBroadcast(this, threadId.hashCode(), markAsReadIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)
758758
var replyAction: NotificationCompat.Action? = null
759759

760760
if (isNougatPlus()) {
@@ -769,7 +769,7 @@ fun Context.showMessageNotification(address: String, body: String, threadId: Lon
769769
}
770770

771771
val replyPendingIntent =
772-
PendingIntent.getBroadcast(applicationContext, threadId.hashCode(), replyIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
772+
PendingIntent.getBroadcast(applicationContext, threadId.hashCode(), replyIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)
773773
replyAction = NotificationCompat.Action.Builder(R.drawable.ic_send_vector, replyLabel, replyPendingIntent)
774774
.addRemoteInput(remoteInput)
775775
.build()

app/src/main/kotlin/com/simplemobiletools/smsmessenger/receivers/SmsStatusSentReceiver.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class SmsStatusSentReceiver : SentReceiver() {
8787
putExtra(THREAD_ID, threadId)
8888
}
8989

90-
val pendingIntent = PendingIntent.getActivity(context, threadId.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
90+
val pendingIntent = PendingIntent.getActivity(context, threadId.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_MUTABLE)
9191
val summaryText = String.format(context.getString(R.string.message_sending_error), recipientName)
9292

9393
val largeIcon = SimpleContactsHelper(context).getContactLetterIcon(recipientName)

0 commit comments

Comments
 (0)