diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java index dab18111c..cabc10d0a 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/NotificationListener.java @@ -352,11 +352,12 @@ public class NotificationListener extends NotificationListenerService { dissectNotificationTo(notification, notificationSpec, preferBigText); - if (!checkNotificationContentForWhiteAndBlackList(sbn.getPackageName().toLowerCase(), notificationSpec.body)) { - return; + if (notificationSpec.body != null) { + if (!checkNotificationContentForWhiteAndBlackList(sbn.getPackageName().toLowerCase(), notificationSpec.body)) { + return; + } } - // ignore Gadgetbridge's very own notifications, except for those from the debug screen if (getApplicationContext().getPackageName().equals(source)) { if (!getApplicationContext().getString(R.string.test_notification).equals(notificationSpec.title)) {