@@ -5,6 +5,7 @@ import android.app.PendingIntent
55import android.content.Context
66import android.content.Intent
77import androidx.core.app.NotificationCompat
8+ import androidx.core.app.TaskStackBuilder
89import kotlinx.coroutines.suspendCancellableCoroutine
910import java.security.cert.X509Certificate
1011import kotlin.coroutines.Continuation
@@ -120,8 +121,16 @@ class UserDecisionRegistry private constructor(
120121 .setContentText(context.getString(R .string.certificate_notification_user_interaction))
121122 .setSubText(cert.subjectDN.name)
122123 .setCategory(NotificationCompat .CATEGORY_SERVICE )
123- .setContentIntent(PendingIntent .getActivity(context, id, decisionIntent, PendingIntent .FLAG_UPDATE_CURRENT or PendingIntent .FLAG_IMMUTABLE ))
124- .setDeleteIntent(PendingIntent .getActivity(context, id + 1 , rejectIntent, PendingIntent .FLAG_UPDATE_CURRENT or PendingIntent .FLAG_IMMUTABLE ))
124+ .setContentIntent(
125+ TaskStackBuilder .create(context)
126+ .addNextIntent(decisionIntent)
127+ .getPendingIntent(id, PendingIntent .FLAG_UPDATE_CURRENT or PendingIntent .FLAG_IMMUTABLE )
128+ )
129+ .setDeleteIntent(
130+ TaskStackBuilder .create(context)
131+ .addNextIntent(rejectIntent)
132+ .getPendingIntent(id + 1 , PendingIntent .FLAG_UPDATE_CURRENT or PendingIntent .FLAG_IMMUTABLE )
133+ )
125134 .build()
126135
127136 val nm = NotificationUtils .createChannels(context)
0 commit comments