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:
parent
96668368c5
commit
f9917851ef
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user