Fix crash when notification state is empty.

fork-5.53.8
Greyson Parrelli 2020-01-26 21:36:23 -05:00
rodzic fea2b6253f
commit 5d54ebfaa0
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -340,7 +340,7 @@ public class MessageNotifier {
if (notificationState.getNotifications().isEmpty()) {
if (!bundled) cancelActiveNotifications(context);
Log.i(TAG, "Empty notification state. Skipping.");
Log.i(TAG, "[sendSingleThreadNotification] Empty notification state. Skipping.");
return;
}
@ -408,6 +408,11 @@ public class MessageNotifier {
{
Log.i(TAG, "sendMultiThreadNotification() signal: " + signal);
if (notificationState.getNotifications().isEmpty()) {
Log.i(TAG, "[sendMultiThreadNotification] Empty notification state. Skipping.");
return;
}
MultipleRecipientNotificationBuilder builder = new MultipleRecipientNotificationBuilder(context, TextSecurePreferences.getNotificationPrivacy(context));
List<NotificationItem> notifications = notificationState.getNotifications();