diff --git a/CHANGELOG.md b/CHANGELOG.md index e3b07dd32..4904d8869 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,17 +2,26 @@ Mapbox welcomes participation and contributions from everyone. If you'd like to do so please see the [`Contributing Guide`](https://github.com/mapbox/mapbox-gl-native/blob/master/CONTRIBUTING.md) first to get started. -## master +## 8.5.0-alpha.2 - October 10, 2019 +[Changes](https://github.com/mapbox/mapbox-gl-native/compare/android-v8.5.0-alpha.1...android-v8.5.0-alpha.2) since [Mapbox Maps SDK for Android v8.5.0-alpha.1](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.5.0-alpha.1): + +### Features + - Expose pre-fetching zoom delta, allows to granular control the delta on which we prefetch tiles [#15769](https://github.com/mapbox/mapbox-gl-native/pull/15769) ### Performance improvements - Improved rendering performance for the styles with multiple sources [#15756](https://github.com/mapbox/mapbox-gl-native/pull/15756) +### Bug fixes + - Fixed runtime exceptions that occurred when a manually built camera object without padding was serialized. [#15788](https://github.com/mapbox/mapbox-gl-native/pull/15788) + - Keep Mapbox when obfuscating code with proguard [#15762](https://github.com/mapbox/mapbox-gl-native/pull/15762) + ## 8.5.0-alpha.1 - October 3, 2019 [Changes](https://github.com/mapbox/mapbox-gl-native/compare/android-v8.4.0...android-v8.5.0-alpha.1) since [Mapbox Maps SDK for Android v8.4.0](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.4.0): ### Bug fixes - Suppress network requests for expired tiles update, if these tiles are invisible. [#15741](https://github.com/mapbox/mapbox-gl-native/pull/15741) - Fixed opacity interpolation for composition expressions [#15738](https://github.com/mapbox/mapbox-gl-native/pull/15738) - Fixed an issue where `Projection#getMetersPerPixelAtLatitude` returned a value incorrectly divided by the pixel ratio. This also fixes an issue where `LocationComponent` accuracy circle's radius was artificially increased. [#15742](https://github.com/mapbox/mapbox-gl-native/pull/15742) + - Coalesce requests to the client for the same missing image [#15778](https://github.com/mapbox/mapbox-gl-native/pull/15778) ## 8.4.0 - September 25, 2019 [Changes](https://github.com/mapbox/mapbox-gl-native/compare/android-v8.4.0-beta.1...android-v8.4.0) since [Mapbox Maps SDK for Android v8.4.0-beta.1](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.4.0-beta.1): @@ -1818,4 +1827,4 @@ Mapbox Android 4.0.0 is the most ambitious Android release to date with 3 major ## 2.1.0 - October 21, 2015 -- Initial Android release. +- Initial Android release. \ No newline at end of file diff --git a/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraPosition.java b/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraPosition.java index e2341029f..54e8fc595 100644 --- a/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraPosition.java +++ b/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/camera/CameraPosition.java @@ -30,8 +30,16 @@ public final class CameraPosition implements Parcelable { LatLng target = in.readParcelable(LatLng.class.getClassLoader()); double tilt = in.readDouble(); double zoom = in.readDouble(); - double[] padding = new double[4]; - in.readDoubleArray(padding); + + double[] padding = null; + int paddingSize = in.readInt(); + if (paddingSize > 0) { + padding = new double[paddingSize]; + for (int i = 0; i < paddingSize; i++) { + padding[i] = in.readDouble(); + } + } + return new CameraPosition(target, zoom, tilt, bearing, padding); } @@ -139,7 +147,16 @@ public final class CameraPosition implements Parcelable { out.writeParcelable(target, flags); out.writeDouble(tilt); out.writeDouble(zoom); - out.writeDoubleArray(padding); + + if (padding != null) { + int length = padding.length; + out.writeInt(length); + for (double v : padding) { + out.writeDouble(v); + } + } else { + out.writeInt(-1); + } } /** @@ -394,4 +411,4 @@ public final class CameraPosition implements Parcelable { return new CameraPosition(target, zoom, tilt, bearing, padding); } } -} +} \ No newline at end of file diff --git a/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/camera/CameraPositionTest.java b/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/camera/CameraPositionTest.java index 6974705fa..a720963e7 100644 --- a/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/camera/CameraPositionTest.java +++ b/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/camera/CameraPositionTest.java @@ -117,4 +117,15 @@ public class CameraPositionTest { CameraPosition cameraPosition2 = CameraPosition.CREATOR.createFromParcel(parcel); assertEquals("Parcel should match original object", cameraPosition1, cameraPosition2); } -} + + @Test + public void testParcelableNulls() { + CameraPosition cameraPosition1 = new CameraPosition(null, 3, 4, 5, null); + Parcel parcel = Parcel.obtain(); + cameraPosition1.writeToParcel(parcel, 0); + parcel.setDataPosition(0); + + CameraPosition cameraPosition2 = CameraPosition.CREATOR.createFromParcel(parcel); + assertEquals("Parcel should match original object", cameraPosition1, cameraPosition2); + } +} \ No newline at end of file diff --git a/vendor/mapbox-gl-native b/vendor/mapbox-gl-native index b4e0224a5..3ac706edf 160000 --- a/vendor/mapbox-gl-native +++ b/vendor/mapbox-gl-native @@ -1 +1 @@ -Subproject commit b4e0224a5786f1d362b2b6b7e7f536be8bb98981 +Subproject commit 3ac706edfefc9c8f2ee1ad9eb38bf688364cdb77