From 9c28d7280b3dcdc422dd9d88f981c3c887674128 Mon Sep 17 00:00:00 2001 From: cyberta Date: Wed, 19 Aug 2020 11:41:46 +0200 Subject: [PATCH] set notification group only for Android API 24+, fixes #1525 --- .../securesms/notifications/NotificationCenter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java index f4ee1c416..9559da9e2 100644 --- a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java +++ b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java @@ -349,11 +349,15 @@ public class NotificationCenter { .setColor(context.getResources().getColor(R.color.delta_primary)) .setPriority(Prefs.getNotificationPriority(context)) .setCategory(NotificationCompat.CATEGORY_MESSAGE) - .setGroup(GRP_MSG) .setOnlyAlertOnce(!signal) .setContentText(line) .setDeleteIntent(getMarkAsReadIntent(chatId, false)) .setContentIntent(getOpenChatIntent(chatId)); + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { + builder.setGroup(GRP_MSG); + } + if (privacy.isDisplayContact()) { builder.setContentTitle(dcChat.getName()); }