Skip to content

Commit

Permalink
Add FLAG_IMMUTABLE
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Marbach <[email protected]>
  • Loading branch information
Johennes committed Jul 25, 2022
1 parent 48217a4 commit d96d957
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package im.vector.app.features.widgets

import android.app.Activity
import android.app.PendingIntent
import android.app.PendingIntent.FLAG_IMMUTABLE
import android.app.PictureInPictureParams
import android.app.RemoteAction
import android.content.BroadcastReceiver
Expand Down Expand Up @@ -172,7 +173,7 @@ class WidgetActivity : VectorBaseActivity<ActivityWidgetBinding>() {
private fun createElementCallPipParams(): PictureInPictureParams? {
val actions = mutableListOf<RemoteAction>()
val intent = Intent(ACTION_MEDIA_CONTROL).putExtra(EXTRA_CONTROL_TYPE, CONTROL_TYPE_HANGUP)
val pendingIntent = PendingIntent.getBroadcast(this, REQUEST_CODE_HANGUP, intent, 0)
val pendingIntent = PendingIntent.getBroadcast(this, REQUEST_CODE_HANGUP, intent, FLAG_IMMUTABLE)
val icon = Icon.createWithResource(this, R.drawable.ic_call_hangup)
actions.add(RemoteAction(icon, getString(R.string.call_notification_hangup), getString(R.string.call_notification_hangup), pendingIntent))

Expand Down

0 comments on commit d96d957

Please sign in to comment.