@@ -5,6 +5,7 @@ import android.app.PendingIntent
5
5
import android.content.Context
6
6
import android.content.Intent
7
7
import androidx.core.app.NotificationCompat
8
+ import androidx.core.app.TaskStackBuilder
8
9
import kotlinx.coroutines.suspendCancellableCoroutine
9
10
import java.security.cert.X509Certificate
10
11
import kotlin.coroutines.Continuation
@@ -120,8 +121,16 @@ class UserDecisionRegistry private constructor(
120
121
.setContentText(context.getString(R .string.certificate_notification_user_interaction))
121
122
.setSubText(cert.subjectDN.name)
122
123
.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
+ )
125
134
.build()
126
135
127
136
val nm = NotificationUtils .createChannels(context)
0 commit comments