2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 05:37:43 +00:00

If capabilities are not present, iterate all plugins

This commit is contained in:
Albert Vaca 2016-06-02 15:22:21 +02:00
parent 7759152eeb
commit 541cd97c71

View File

@ -559,7 +559,8 @@ public class Device implements BaseLink.PackageReceiver {
} else if (isPaired()) {
ArrayList<String> targetPlugins = pluginsByIncomingInterface.get(np.getType());
//If capabilities are not supported, iterate all plugins
Collection<String> 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<String> targetPlugins = pluginsByIncomingInterface.get(np.getType());
//If capabilities are not supported, iterate all plugins
Collection<String> targetPlugins = (protocolVersion > 6)? pluginsByIncomingInterface.get(np.getType()) : plugins.keySet();
if (targetPlugins != null && !targetPlugins.isEmpty()) {
for (String pluginKey : targetPlugins) {
Plugin plugin = plugins.get(pluginKey);