mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-29 13:17:43 +00:00
Trying to fix a concurrency exception
This commit is contained in:
parent
a15d76c588
commit
34e53576e1
@ -529,7 +529,7 @@ public class Device implements BaseLink.PackageReceiver {
|
|||||||
return plugins.get(name);
|
return plugins.get(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addPlugin(final String name) {
|
private synchronized void addPlugin(final String name) {
|
||||||
Plugin existing = plugins.get(name);
|
Plugin existing = plugins.get(name);
|
||||||
if (existing != null) {
|
if (existing != null) {
|
||||||
Log.w("addPlugin","plugin already present:" + name);
|
Log.w("addPlugin","plugin already present:" + name);
|
||||||
@ -575,7 +575,7 @@ public class Device implements BaseLink.PackageReceiver {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean removePlugin(String name) {
|
private synchronized boolean removePlugin(String name) {
|
||||||
|
|
||||||
Plugin plugin = plugins.remove(name);
|
Plugin plugin = plugins.remove(name);
|
||||||
Plugin failedPlugin = failedPlugins.remove(name);
|
Plugin failedPlugin = failedPlugins.remove(name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user