mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 04:46:51 +01:00
prevent rare NPE in onNotificationRemoved()
This commit is contained in:
parent
f2dca649a3
commit
742615c6f4
@ -417,6 +417,10 @@ public class NotificationListener extends NotificationListenerService {
|
||||
@Override
|
||||
public void onNotificationRemoved(StatusBarNotification sbn) {
|
||||
//FIXME: deduplicate code
|
||||
if (!isServiceRunning() || sbn == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String source = sbn.getPackageName();
|
||||
Notification notification = sbn.getNotification();
|
||||
if ((notification.flags & Notification.FLAG_ONGOING_EVENT) == Notification.FLAG_ONGOING_EVENT) {
|
||||
|
Loading…
Reference in New Issue
Block a user