Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] - avoid printing warning on recursively loading shared object
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Jan 17, 2019
1 parent 1cdf619 commit 9a76621
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 9a76621

Please sign in to comment.