Merge branch 'PendingIntent.FLAG_IMMUTABLE' into 'master'

set all swap PendingIntents with PendingIntent.FLAG_IMMUTABLE

See merge request fdroid/fdroidclient!1244
This commit is contained in:
Torsten Grote
2023-06-15 17:01:12 +00:00

View File

@@ -501,7 +501,8 @@ public class SwapService extends Service {
private Notification createNotification() {
Intent intent = new Intent(this, SwapWorkflowActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, intent,
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
return new NotificationCompat.Builder(this, NotificationHelper.CHANNEL_SWAPS)
.setContentTitle(getText(R.string.local_repo_running))
.setContentText(getText(R.string.touch_to_configure_local_repo))