mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-01 06:35:09 +00:00
Remove outdated comments
This commit is contained in:
@@ -692,12 +692,10 @@ public class Device implements BaseLink.PacketReceiver {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
//Make a copy to avoid concurrent modification exception if the original list changes
|
|
||||||
for (final BaseLink link : links) {
|
for (final BaseLink link : links) {
|
||||||
if (link == null)
|
if (link == null) continue;
|
||||||
continue; //Since we made a copy, maybe somebody destroyed the link in the meanwhile
|
|
||||||
success = link.sendPacket(np, callback);
|
success = link.sendPacket(np, callback);
|
||||||
if (success) break; //If the link didn't call sendSuccess(), try the next one
|
if (success) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
|
@@ -546,7 +546,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
|||||||
} else if (np.has("cancel")) {
|
} else if (np.has("cancel")) {
|
||||||
final String dismissedId = np.getString("cancel");
|
final String dismissedId = np.getString("cancel");
|
||||||
currentNotifications.remove(dismissedId);
|
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")) {
|
} else if (np.has("requestReplyId") && np.has("message")) {
|
||||||
replyToNotification(np.getString("requestReplyId"), np.getString("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};
|
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) {
|
private static String getNotificationKeyCompat(StatusBarNotification statusBarNotification) {
|
||||||
String result;
|
String result;
|
||||||
// first check if it's one of our remoteIds
|
// first check if it's one of our remoteIds
|
||||||
|
Reference in New Issue
Block a user