mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 13:47:41 +00:00
Fix crash on old API
This commit is contained in:
@@ -466,10 +466,12 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
|||||||
|
|
||||||
private void sendCurrentNotifications(NotificationReceiver service) {
|
private void sendCurrentNotifications(NotificationReceiver service) {
|
||||||
StatusBarNotification[] notifications = service.getActiveNotifications();
|
StatusBarNotification[] notifications = service.getActiveNotifications();
|
||||||
|
if (notifications != null) { //Can happen only on API 23 and lower
|
||||||
for (StatusBarNotification notification : notifications) {
|
for (StatusBarNotification notification : notifications) {
|
||||||
sendNotification(notification);
|
sendNotification(notification);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPacketReceived(final NetworkPacket np) {
|
public boolean onPacketReceived(final NetworkPacket np) {
|
||||||
|
Reference in New Issue
Block a user