[android] - avoid printing warning on recursively loading shared object

This commit is contained in:
tobrun
2019-01-17 12:34:58 +01:00
committed by Tobrun
parent 1cdf619f03
commit 9a76621d90

View File

@@ -16,12 +16,17 @@ public abstract class LibraryLoader {
private static final LibraryLoader DEFAULT = new LibraryLoader() {
@Override
public void load(String name) {
System.loadLibrary(name);
if (!loaded) {
System.loadLibrary(name);
}
loaded = true;
}
};
private static volatile LibraryLoader loader = DEFAULT;
protected static boolean loaded;
/**
* Set the library loader that loads the shared library.
*