diff --git a/LICENSE.md b/LICENSE.md index 00e5c23ab..af6e18d36 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -218,24 +218,6 @@ License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) =========================================================================== -Mapbox GL uses portions of SoLoader. -URL: [https://github.com/facebook/soloader](https://github.com/facebook/soloader) -License: [Apache-2](https://github.com/facebook/soloader/blob/master/LICENSE) - -=========================================================================== - -Mapbox GL uses portions of SoLoader. -URL: [https://github.com/facebook/soloader](https://github.com/facebook/soloader) -License: [Apache-2](https://github.com/facebook/soloader/blob/master/LICENSE) - -=========================================================================== - -Mapbox GL uses portions of SoLoader. -URL: [https://github.com/facebook/soloader](https://github.com/facebook/soloader) -License: [Apache-2](https://github.com/facebook/soloader/blob/master/LICENSE) - -=========================================================================== - Mapbox GL uses portions of VersionedParcelable and friends. URL: [http://developer.android.com/tools/extras/support-library.html](http://developer.android.com/tools/extras/support-library.html) License: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) diff --git a/MapboxGLAndroidSDK/build.gradle b/MapboxGLAndroidSDK/build.gradle index 5ee3af61e..0e9b24714 100644 --- a/MapboxGLAndroidSDK/build.gradle +++ b/MapboxGLAndroidSDK/build.gradle @@ -13,7 +13,6 @@ dependencies { implementation dependenciesList.supportAnnotations implementation dependenciesList.supportFragmentV4 implementation dependenciesList.okhttp3 - implementation dependenciesList.soLoader testImplementation dependenciesList.junit testImplementation dependenciesList.mockito testImplementation dependenciesList.mockk diff --git a/MapboxGLAndroidSDK/proguard-rules.pro b/MapboxGLAndroidSDK/proguard-rules.pro index 864910617..39ee13d85 100644 --- a/MapboxGLAndroidSDK/proguard-rules.pro +++ b/MapboxGLAndroidSDK/proguard-rules.pro @@ -41,10 +41,4 @@ # while we don't include this dependency directly # a large amount of users combine it with our SDK # we aren't able to provide a proguard config in that project (jar vs aar) --dontwarn com.sun.xml.internal.ws.spi.db.* - -# config for SoLoader https://github.com/mapbox/mapbox-gl-native-android/issues/60, -# https://github.com/facebook/SoLoader/blob/master/java/com/facebook/soloader/soloader.pro --keep class com.facebook.soloader.SysUtil$LollipopSysdeps { - public ; -} \ No newline at end of file +-dontwarn com.sun.xml.internal.ws.spi.db.* \ No newline at end of file diff --git a/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java b/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java index 96e97a850..03a1975df 100644 --- a/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java +++ b/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/LibraryLoader.java @@ -5,7 +5,7 @@ /** * Loads the mapbox-gl shared library *

- * By default uses SoLoader from https://github.com/facebook/SoLoader + * By default uses System.loadLibrary * use {@link #setLibraryLoader(LibraryLoader)} to provide an alternative library loading hook. *

*/ diff --git a/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/module/loader/LibraryLoaderProviderImpl.java b/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/module/loader/LibraryLoaderProviderImpl.java index b5c03d6b9..948164b32 100644 --- a/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/module/loader/LibraryLoaderProviderImpl.java +++ b/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/module/loader/LibraryLoaderProviderImpl.java @@ -2,17 +2,10 @@ import com.mapbox.mapboxsdk.LibraryLoader; import com.mapbox.mapboxsdk.LibraryLoaderProvider; -import com.mapbox.mapboxsdk.Mapbox; -import com.mapbox.mapboxsdk.exceptions.MapboxConfigurationException; -import com.mapbox.mapboxsdk.log.Logger; - -import static com.facebook.soloader.SoLoader.init; -import static com.facebook.soloader.SoLoader.loadLibrary; /** * Concrete implementation of a native library loader. *

- * Uses SoLoader from https://github.com/facebook/SoLoader. *

*/ public class LibraryLoaderProviderImpl implements LibraryLoaderProvider { @@ -24,27 +17,16 @@ public class LibraryLoaderProviderImpl implements LibraryLoaderProvider { */ @Override public LibraryLoader getDefaultLibraryLoader() { - return new SoLibraryLoader(); + return new SystemLibraryLoader(); } /** - * Concrete implementation of a LibraryLoader using SoLoader. + * Concrete implementation of a LibraryLoader using System.loadLibrary. */ - private static class SoLibraryLoader extends LibraryLoader { - - private static final String TAG = "SoLibraryLoader"; - + private static class SystemLibraryLoader extends LibraryLoader { @Override public void load(String name) { - try { - // nativeExopackage = false, https://buck.build/article/exopackage.html - init(Mapbox.getApplicationContext(), false); - loadLibrary(name); - } catch (MapboxConfigurationException exception) { - Logger.e(TAG, "Couldn't load so file with relinker, application context missing, " - + "call Mapbox.getInstance(Context context, String accessToken) first"); - throw new UnsatisfiedLinkError(exception.getMessage()); - } + System.loadLibrary(name); } } } diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 5540ae378..620dd5d46 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -35,7 +35,6 @@ ext { androidPublish : '3.6.2', lint : '26.4.2', gms : '16.0.0', - soLoader : '0.8.0', jacoco : '0.8.4', appcenter : '1.4', ktlint : '0.34.0', @@ -74,7 +73,6 @@ ext { okhttp3 : "com.squareup.okhttp3:okhttp:${versions.okhttp}", leakCanaryDebug : "com.squareup.leakcanary:leakcanary-android:${versions.leakCanary}", leakCanaryRelease : "com.squareup.leakcanary:leakcanary-android-no-op:${versions.leakCanary}", - soLoader : "com.facebook.soloader:soloader:${versions.soLoader}", kotlinLib : "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${versions.kotlin}", kotlinPlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",