diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/services/XiaomiNotificationService.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/services/XiaomiNotificationService.java index 7f772ea6f..81d946e78 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/services/XiaomiNotificationService.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/xiaomi/services/XiaomiNotificationService.java @@ -229,6 +229,11 @@ public class XiaomiNotificationService extends AbstractXiaomiService implements return; } + if (mNotificationPackageName.lookup(id) == null) { + LOG.warn("Unable to lookup notification {} to delete", id); + return; + } + final XiaomiProto.NotificationId notificationId = XiaomiProto.NotificationId.newBuilder() .setId(id) .setPackage(mNotificationPackageName.lookup(id))