mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 21:55:10 +00:00
Remove outdated comments
This commit is contained in:
@@ -692,12 +692,10 @@ public class Device implements BaseLink.PacketReceiver {
|
||||
*/
|
||||
|
||||
boolean success = false;
|
||||
//Make a copy to avoid concurrent modification exception if the original list changes
|
||||
for (final BaseLink link : links) {
|
||||
if (link == null)
|
||||
continue; //Since we made a copy, maybe somebody destroyed the link in the meanwhile
|
||||
if (link == null) continue;
|
||||
success = link.sendPacket(np, callback);
|
||||
if (success) break; //If the link didn't call sendSuccess(), try the next one
|
||||
if (success) break;
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
|
@@ -546,7 +546,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
||||
} else if (np.has("cancel")) {
|
||||
final String dismissedId = np.getString("cancel");
|
||||
currentNotifications.remove(dismissedId);
|
||||
NotificationReceiver.RunCommand(context, service -> cancelNotificationCompat(service, dismissedId));
|
||||
NotificationReceiver.RunCommand(context, service -> service.cancelNotification(dismissedId));
|
||||
} else if (np.has("requestReplyId") && np.has("message")) {
|
||||
replyToNotification(np.getString("requestReplyId"), np.getString("message"));
|
||||
}
|
||||
@@ -577,11 +577,6 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
||||
return new String[]{PACKET_TYPE_NOTIFICATION};
|
||||
}
|
||||
|
||||
//For compat with API<21, because lollipop changed the way to cancel notifications
|
||||
private static void cancelNotificationCompat(NotificationReceiver service, String compatKey) {
|
||||
service.cancelNotification(compatKey);
|
||||
}
|
||||
|
||||
private static String getNotificationKeyCompat(StatusBarNotification statusBarNotification) {
|
||||
String result;
|
||||
// first check if it's one of our remoteIds
|
||||
|
Reference in New Issue
Block a user