mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 21:06:50 +01:00
fix notification lookup crash
This commit is contained in:
parent
aeba34cc81
commit
b7277f02a6
@ -630,7 +630,12 @@ public class NotificationListener extends NotificationListenerService {
|
||||
public void onNotificationRemoved(StatusBarNotification sbn) {
|
||||
LOG.info("Notification removed: " + sbn.getPackageName());
|
||||
|
||||
int originalId = (int) mNotificationHandleLookup.lookupByValue(sbn.getPostTime());
|
||||
Object lookupObject = mNotificationHandleLookup.lookupByValue(sbn.getPostTime());;
|
||||
if(lookupObject == null){
|
||||
LOG.debug("removed notification not found");
|
||||
return;
|
||||
}
|
||||
int originalId = (int) lookupObject;
|
||||
|
||||
if (GBApplication.isRunningLollipopOrLater()) {
|
||||
LOG.info("Notification removed: " + sbn.getPackageName() + ", category: " + sbn.getNotification().category);
|
||||
|
Loading…
Reference in New Issue
Block a user