Skip to content

Commit

Permalink
fix:[ANDROAPP-6695] Add immutable flag to pending intent get activity…
Browse files Browse the repository at this point in the history
… method (#3927)
  • Loading branch information
xavimolloy authored Dec 16, 2024
1 parent fa5d302 commit b642569
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/org/dhis2/widgets/DhisCustomLauncher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class DhisCustomLauncher : AppWidgetProvider() {
val remoteViews = RemoteViews(context.packageName, R.layout.dhis_custom_launcher)
val configIntent = Intent(context, SplashActivity::class.java)

val configPendingIntent = PendingIntent.getActivity(context, 0, configIntent, 0)
val configPendingIntent = PendingIntent.getActivity(context, 0, configIntent, PendingIntent.FLAG_IMMUTABLE)

remoteViews.setOnClickPendingIntent(R.id.appwidget_image, configPendingIntent)
appWidgetManager.updateAppWidget(appWidgetIds, remoteViews)
Expand Down Expand Up @@ -80,7 +80,7 @@ class DhisCustomLauncher : AppWidgetProvider() {

private fun getPendingIntent(context: Context): PendingIntent {
val intent = Intent(context, SplashActivity::class.java)
return PendingIntent.getActivity(context, 0, intent, 0)
return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE)
}
}
}

0 comments on commit b642569

Please sign in to comment.