mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 05:37:43 +00:00
Fixed rare crash
This commit is contained in:
parent
48cd5aa29b
commit
113739e1d9
@ -433,6 +433,10 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
||||
service.cancelNotification(compatKey);
|
||||
} else {
|
||||
int first = compatKey.indexOf(':');
|
||||
if (first == -1) {
|
||||
Log.e("cancelNotificationCompa","Not formated like a notification key: "+ compatKey);
|
||||
return;
|
||||
}
|
||||
int last = compatKey.lastIndexOf(':');
|
||||
String packageName = compatKey.substring(0, first);
|
||||
String tag = compatKey.substring(first + 1, last);
|
||||
|
Loading…
x
Reference in New Issue
Block a user