mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-29 13:17:43 +00:00
Update comments
This commit is contained in:
parent
f2f1930cec
commit
d9e641ae28
@ -563,9 +563,8 @@ public class Device implements BaseLink.PacketReceiver {
|
|||||||
reloadPluginsFromSettings();
|
reloadPluginsFromSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
//If capabilities are not supported, iterate all plugins
|
|
||||||
Collection<String> targetPlugins = pluginsByIncomingInterface.get(np.getType());
|
Collection<String> targetPlugins = pluginsByIncomingInterface.get(np.getType());
|
||||||
if (!targetPlugins.isEmpty()) {
|
if (!targetPlugins.isEmpty()) { // When a key doesn't exist the multivaluemap returns an empty collection, so we don't need to check for null
|
||||||
for (String pluginKey : targetPlugins) {
|
for (String pluginKey : targetPlugins) {
|
||||||
Plugin plugin = plugins.get(pluginKey);
|
Plugin plugin = plugins.get(pluginKey);
|
||||||
try {
|
try {
|
||||||
@ -588,10 +587,8 @@ public class Device implements BaseLink.PacketReceiver {
|
|||||||
|
|
||||||
unpair();
|
unpair();
|
||||||
|
|
||||||
//If capabilities are not supported, iterate through all plugins.
|
// The following code is NOT USED. It adds support for receiving packets from not trusted devices, but as of March 2023 no plugin implements "onUnpairedDevicePacketReceived".
|
||||||
Collection<String> targetPlugins = pluginsByIncomingInterface.get(np.getType());
|
Collection<String> targetPlugins = pluginsByIncomingInterface.get(np.getType());
|
||||||
// When a mapping doesn't exist, an empty collection is added to the map and
|
|
||||||
// then returned, so a null check is not necessary.
|
|
||||||
if (!targetPlugins.isEmpty()) {
|
if (!targetPlugins.isEmpty()) {
|
||||||
for (String pluginKey : targetPlugins) {
|
for (String pluginKey : targetPlugins) {
|
||||||
Plugin plugin = plugins.get(pluginKey);
|
Plugin plugin = plugins.get(pluginKey);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user