From 541cd97c71384f54014b95e7f30da0a35bd86183 Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Thu, 2 Jun 2016 15:22:21 +0200 Subject: [PATCH] If capabilities are not present, iterate all plugins --- src/org/kde/kdeconnect/Device.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/org/kde/kdeconnect/Device.java b/src/org/kde/kdeconnect/Device.java index 61850f4a..e73e3ef2 100644 --- a/src/org/kde/kdeconnect/Device.java +++ b/src/org/kde/kdeconnect/Device.java @@ -559,7 +559,8 @@ public class Device implements BaseLink.PackageReceiver { } else if (isPaired()) { - ArrayList targetPlugins = pluginsByIncomingInterface.get(np.getType()); + //If capabilities are not supported, iterate all plugins + Collection targetPlugins = (protocolVersion > 6)? pluginsByIncomingInterface.get(np.getType()) : plugins.keySet(); if (targetPlugins != null && !targetPlugins.isEmpty()) { for (String pluginKey : targetPlugins) { Plugin plugin = plugins.get(pluginKey); @@ -583,7 +584,8 @@ public class Device implements BaseLink.PackageReceiver { unpair(); - ArrayList targetPlugins = pluginsByIncomingInterface.get(np.getType()); + //If capabilities are not supported, iterate all plugins + Collection targetPlugins = (protocolVersion > 6)? pluginsByIncomingInterface.get(np.getType()) : plugins.keySet(); if (targetPlugins != null && !targetPlugins.isEmpty()) { for (String pluginKey : targetPlugins) { Plugin plugin = plugins.get(pluginKey);