Allow all notifications to be cancelled when bubbles are disabled.

This commit is contained in:
Cody Henthorne 2022-11-10 12:41:15 -05:00 committed by Greyson Parrelli
parent 9d71c4df81
commit 28193c2f61

View file

@ -68,7 +68,8 @@ public final class BubbleUtil {
NotificationChannel conversationChannel = notificationManager.getNotificationChannel(ConversationUtil.getChannelId(context, recipient),
ConversationUtil.getShortcutId(recipientId));
return notificationManager.areBubblesAllowed() || (conversationChannel != null && conversationChannel.canBubble());
return (Build.VERSION.SDK_INT < 31 || (notificationManager.areBubblesEnabled() && notificationManager.getBubblePreference() != NotificationManager.BUBBLE_PREFERENCE_NONE)) &&
(notificationManager.areBubblesAllowed() || (conversationChannel != null && conversationChannel.canBubble()));
}
/**