mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-29 13:17:43 +00:00
Fix crash on old API
This commit is contained in:
parent
3b82cd44e4
commit
a8bc4f24c7
@ -466,8 +466,10 @@ 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();
|
||||||
for (StatusBarNotification notification : notifications) {
|
if (notifications != null) { //Can happen only on API 23 and lower
|
||||||
sendNotification(notification);
|
for (StatusBarNotification notification : notifications) {
|
||||||
|
sendNotification(notification);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user