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