From 14b615a022ba3853d3eaa843b41e09ae99e90c5b Mon Sep 17 00:00:00 2001 From: Kevin Li Date: Thu, 7 May 2020 18:53:46 +0800 Subject: [PATCH] Cherry-pick release water (#372) * Bump telemetry to 5.0.1, core to 2.0.1 (#370) (cherry picked from commit 9d5b1f68b1d7ab7abc5db94dfbcd94435887c4d8) * Rollback to System.loadLibrary to load native library. (#368) * Rollback to System.loadLibrary if SoLoader failed to load library. * Remove soloader. (cherry picked from commit 01f1b1e6eb66a1d4834967fb9ed38f422bcd0a5b) * Update changelog for 9.2.0 (#371) * Update changelog for 9.2.0 * Update changelog for 9.2.0 * Update changelog for 9.2.0 * Update changelog for 9.2.0 (cherry picked from commit ea7acd6deed831721ab62df3cc83b4605630a51d) --- CHANGELOG.md | 8 ++++-- LICENSE.md | 18 ------------- MapboxGLAndroidSDK/build.gradle | 1 - MapboxGLAndroidSDK/proguard-rules.pro | 8 +----- .../com/mapbox/mapboxsdk/LibraryLoader.java | 2 +- .../loader/LibraryLoaderProviderImpl.java | 26 +++---------------- gradle/dependencies.gradle | 6 ++--- vendor/mapbox-events-android | 2 +- 8 files changed, 15 insertions(+), 56 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4bb77da0..abc4be57f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [`Contributing Guide`](https://github.com/mapbox/mapbox-gl-native/blob/master/CONTRIBUTING.md) to get started. -## 9.2.0-beta.1 - April 30, 2020 +## 9.2.0 - May 7, 2020 ### Features - Added the `distance` expression for calculating the shortest distance between an evaluated feature and a given GeoJSON object. ([#339](https://github.com/mapbox/mapbox-gl-native-android/pull/339)) - The [`SymbolLayer.iconTextFit`](https://docs.mapbox.com/android/api/map-sdk/9.2.0-beta.1/com/mapbox/mapboxsdk/style/layers/PropertyFactory.html#iconTextFit-com.mapbox.mapboxsdk.style.expressions.Expression-) property now respects the stretch metadata of any nine-part stretchable image passed into the `style.addImage` method. You can define the stretchable area of an image by configuring the `stretchX`, `stretchY`, `content` options on `Style.addImage` to append the requisite [metadata](https://github.com/mapbox/mapbox-gl-js/issues/8917). ([#314](https://github.com/mapbox/mapbox-gl-native-android/pull/314)) @@ -25,7 +25,11 @@ Mapbox welcomes participation and contributions from everyone. Please read [`Con - Fixed a crash when encountering an invalid polyline. ([#16409](https://github.com/mapbox/mapbox-gl-native/pull/16409)) - Certain logging statements no longer run on the main thread. ([#16325](https://github.com/mapbox/mapbox-gl-native/pull/16325)) -## 9.1.0 +### Other changes + - Rollback to `System.loadLibrary` to fix SoLoader fails to load the native library on x86 devices. ([#368](https://github.com/mapbox/mapbox-gl-native-android/pull/368)) + - Worked around crashes caused by `JobIntentService` on devices >= API 26 by using a network request to report errors instead. ([#472](https://github.com/mapbox/mapbox-events-android/pull/472) + +## 9.1.0 - April 7, 2020 ### Features - Added `within` expression for testing whether an evaluated feature lies within a given GeoJSON object. `within` accepts `Feature`, `FeatureCollection`, `Polygon`, and `MultiPolygon` as valid GeoJSON objects. ([#198](https://github.com/mapbox/mapbox-gl-native-android/pull/198)) - Added `in` expression for testing whether an item exists in an array or a substring exists in a string. ([#171](https://github.com/mapbox/mapbox-gl-native-android/pull/171)) 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 2586dbc8a..620dd5d46 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -8,8 +8,8 @@ ext { versions = [ mapboxServices : '5.0.0', - mapboxTelemetry : '5.0.0', - mapboxCore : '2.0.0', + mapboxTelemetry : '5.0.1', + mapboxCore : '2.0.1', mapboxGestures : '0.7.0', mapboxAccounts : '0.7.0', appCompat : '1.0.0', @@ -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}", diff --git a/vendor/mapbox-events-android b/vendor/mapbox-events-android index 0b46d29ef..9f6a7b2de 160000 --- a/vendor/mapbox-events-android +++ b/vendor/mapbox-events-android @@ -1 +1 @@ -Subproject commit 0b46d29efd23d870e1f084f0591091a16169c800 +Subproject commit 9f6a7b2decba083f75860ce1ebea0ecb17f53dd4