1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-13 16:40:50 +02:00

Xiaomi: Fix NPE when notification lookup fails

This commit is contained in:
José Rebelo 2024-03-06 20:47:57 +00:00
parent 96668368c5
commit f9917851ef

View File

@ -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))