Skip to content
Snippets Groups Projects
Commit f4382884 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Improve ML management

Do not reload while already loading and no need to have ML initilized
for adding/removing callbacks
parent 43c800f4
No related branches found
No related tags found
No related merge requests found
......@@ -91,6 +91,8 @@ public class Medialibrary {
}
public String[] getFoldersList() {
if (!mIsInitiated)
return new String[0];
return nativeEntryPoints();
}
......@@ -174,7 +176,7 @@ public class Medialibrary {
}
public void reload() {
if (mIsInitiated)
if (mIsInitiated && !isWorking())
nativeReload();
}
......@@ -373,14 +375,10 @@ public class Medialibrary {
}
public void addDeviceDiscoveryCb(DevicesDiscoveryCb cb) {
if (!mIsInitiated)
return;
devicesDiscoveryCbList.add(cb);
}
public void removeDeviceDiscoveryCb(DevicesDiscoveryCb cb) {
if (!mIsInitiated)
return;
devicesDiscoveryCbList.remove(cb);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment