add IMMUTABLE flag to intents
This commit is contained in:
parent
0435a70377
commit
c41acde516
|
@ -50,7 +50,7 @@ class MyWidgetRecordDisplayProvider : AppWidgetProvider() {
|
|||
private fun setupAppOpenIntent(context: Context, views: RemoteViews) {
|
||||
Intent(context, BackgroundRecordActivity::class.java).apply {
|
||||
action = BackgroundRecordActivity.RECORD_INTENT_ACTION
|
||||
val pendingIntent = PendingIntent.getActivity(context, OPEN_APP_INTENT_ID, this, PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
val pendingIntent = PendingIntent.getActivity(context, OPEN_APP_INTENT_ID, this, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
|
||||
views.setOnClickPendingIntent(R.id.record_display_btn, pendingIntent)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -283,7 +283,7 @@ class RecorderService : Service() {
|
|||
|
||||
private fun getOpenAppIntent(): PendingIntent {
|
||||
val intent = getLaunchIntent() ?: Intent(this, SplashActivity::class.java)
|
||||
return PendingIntent.getActivity(this, RECORDER_RUNNING_NOTIF_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
return PendingIntent.getActivity(this, RECORDER_RUNNING_NOTIF_ID, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
|
||||
}
|
||||
|
||||
private fun broadcastDuration() {
|
||||
|
|
Loading…
Reference in New Issue