[android] - add library loading to peer objects

This commit is contained in:
tobrun
2019-01-17 12:35:20 +01:00
committed by Tobrun
parent b83030aa9b
commit 3691a2b25e
2 changed files with 11 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.google.gson.JsonElement;
import com.mapbox.mapboxsdk.LibraryLoader;
import com.mapbox.mapboxsdk.style.expressions.Expression;
import com.mapbox.mapboxsdk.style.types.Formatted;
import com.mapbox.mapboxsdk.utils.ThreadUtils;
@@ -20,6 +21,10 @@ public abstract class Layer {
private boolean invalidated;
private boolean detached;
static {
LibraryLoader.load();
}
@Keep
protected Layer(long nativePtr) {
checkThread();

View File

@@ -3,6 +3,8 @@ package com.mapbox.mapboxsdk.style.sources;
import android.support.annotation.Keep;
import android.support.annotation.NonNull;
import com.mapbox.mapboxsdk.LibraryLoader;
import com.mapbox.mapboxsdk.utils.ThreadUtils;
/**
@@ -15,6 +17,10 @@ public abstract class Source {
protected boolean detached;
static {
LibraryLoader.load();
}
/**
* Internal use
*