2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 21:55:10 +00:00

Fixed concurrent modification exception

This commit is contained in:
Albert Vaca
2015-09-14 04:19:13 -07:00
parent 0e8257d515
commit 45ca9aae89

View File

@@ -53,6 +53,7 @@ import java.util.HashSet;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
public class Device implements BaseLink.PackageReceiver {
@@ -72,8 +73,8 @@ public class Device implements BaseLink.PackageReceiver {
private final CopyOnWriteArrayList<BaseLink> links = new CopyOnWriteArrayList<>();
private final HashMap<String, Plugin> plugins = new HashMap<>();
private final HashMap<String, Plugin> failedPlugins = new HashMap<>();
private final ConcurrentHashMap<String, Plugin> plugins = new ConcurrentHashMap<>();
private final ConcurrentHashMap<String, Plugin> failedPlugins = new ConcurrentHashMap<>();
private final SharedPreferences settings;
@@ -791,11 +792,11 @@ public class Device implements BaseLink.PackageReceiver {
}
}
public HashMap<String,Plugin> getLoadedPlugins() {
public ConcurrentHashMap<String,Plugin> getLoadedPlugins() {
return plugins;
}
public HashMap<String,Plugin> getFailedPlugins() {
public ConcurrentHashMap<String,Plugin> getFailedPlugins() {
return failedPlugins;
}