Explicitly define mutability for PendingIntents

This commit is contained in:
Moez Bhatti
2022-12-12 18:25:46 -05:00
parent 2c332c06b6
commit 634f04b7aa
8 changed files with 22 additions and 22 deletions
@@ -29,7 +29,7 @@ class AlarmManagerImpl @Inject constructor(private val context: Context) : Alarm
override fun getScheduledMessageIntent(id: Long): PendingIntent {
val intent = Intent(context, SendScheduledMessageReceiver::class.java).putExtra("id", id)
return PendingIntent.getBroadcast(context, id.toInt(), intent, PendingIntent.FLAG_UPDATE_CURRENT)
return PendingIntent.getBroadcast(context, id.toInt(), intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
}
override fun setAlarm(date: Long, intent: PendingIntent) {