summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authortobrun <tobrun.van.nuland@gmail.com>2019-01-17 12:34:58 +0100
committerTobrun <tobrun@mapbox.com>2019-01-17 13:31:45 +0100
commit9a76621d906c0640487a940f2267b053f64e9498 (patch)
treeba129bf83cf7d9ac1ceddbee3cad231a50c11a17 /platform
parent1cdf619f033b3080c44afdf46a34f82f160b04f2 (diff)
downloadqtlocation-mapboxgl-9a76621d906c0640487a940f2267b053f64e9498.tar.gz
[android] - avoid printing warning on recursively loading shared object
Diffstat (limited to 'platform')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java
index fb0904f051..48417047d5 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java
@@ -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.
*