From 13dda82da4a3e6d67b778b831910ce0bc0e639d4 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 13 Jul 2022 18:25:40 -0500 Subject: [PATCH] Fix for targeting 31+ com.cheogram.android: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. --- .../siacs/conversations/services/NotificationService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index 037ccb606bdb6b6a996a4522610ba32e97f0f0b5..3b5e7edaa12b12df5e39d299cb8153bae7db1c89 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -1609,9 +1609,11 @@ public class NotificationService { intent.setAction(XmppConnectionService.ACTION_CLEAR_MISSED_CALL_NOTIFICATION); if (conversation != null) { intent.putExtra("uuid", conversation.getUuid()); - return PendingIntent.getService(mXmppConnectionService, generateRequestCode(conversation, 21), intent, 0); + return PendingIntent.getService(mXmppConnectionService, generateRequestCode(conversation, 21), intent, + s() ? PendingIntent.FLAG_IMMUTABLE : 0); } - return PendingIntent.getService(mXmppConnectionService, 1, intent, 0); + return PendingIntent.getService(mXmppConnectionService, 1, intent, + s() ? PendingIntent.FLAG_IMMUTABLE : 0); } private PendingIntent createReplyIntent(