diff --git a/.travis.yml b/.travis.yml index 5ae5baac6..eb779e245 100644 --- a/.travis.yml +++ b/.travis.yml @@ -63,9 +63,6 @@ matrix: - nvm use 4 - make node - make test-node - after_script: - - ccache --show-stats - - ./platform/node/scripts/after_script.sh ${TRAVIS_JOB_NUMBER} ${TRAVIS_TAG:-} # GCC 5 - Debug - Coverage - os: linux diff --git a/include/mbgl/storage/network_status.hpp b/include/mbgl/storage/network_status.hpp index d7f502a3b..1b5471a44 100644 --- a/include/mbgl/storage/network_status.hpp +++ b/include/mbgl/storage/network_status.hpp @@ -1,6 +1,7 @@ #pragma once -#include +#include + #include #include @@ -26,7 +27,7 @@ public: static void Unsubscribe(util::AsyncTask* async); private: - static std::atomic online; + static util::Atomic online; static std::mutex mtx; static std::set observers; }; diff --git a/include/mbgl/util/run_loop.hpp b/include/mbgl/util/run_loop.hpp index 9703fe7bc..56965c97e 100644 --- a/include/mbgl/util/run_loop.hpp +++ b/include/mbgl/util/run_loop.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -9,7 +10,6 @@ #include #include #include -#include namespace mbgl { namespace util { @@ -59,7 +59,7 @@ public: template std::unique_ptr invokeCancellable(Fn&& fn, Args&&... args) { - auto flag = std::make_shared>(); + auto flag = std::make_shared>(); *flag = false; auto tuple = std::make_tuple(std::move(args)...); @@ -77,7 +77,7 @@ public: template std::unique_ptr invokeWithCallback(Fn&& fn, Cb&& callback, Args&&... args) { - auto flag = std::make_shared>(); + auto flag = std::make_shared>(); *flag = false; // Create a lambda L1 that invokes another lambda L2 on the current RunLoop R, that calls @@ -114,7 +114,7 @@ private: template class Invoker : public WorkTask { public: - Invoker(F&& f, P&& p, std::shared_ptr> canceled_ = nullptr) + Invoker(F&& f, P&& p, std::shared_ptr> canceled_ = nullptr) : canceled(std::move(canceled_)), func(std::move(f)), params(std::move(p)) { @@ -148,7 +148,7 @@ private: } std::recursive_mutex mutex; - std::shared_ptr> canceled; + std::shared_ptr> canceled; F func; P params; diff --git a/platform/android/CHANGELOG.md b/platform/android/CHANGELOG.md index f73c5ba19..aac115c5d 100644 --- a/platform/android/CHANGELOG.md +++ b/platform/android/CHANGELOG.md @@ -2,6 +2,22 @@ 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. +## 4.1.0-beta.2 + +* Dynamically Update InfoWindow ([#5237](https://github.com/mapbox/mapbox-gl-native/issues/5237)) +* armeabi ABI Work On armv7 Devices ([#3985](https://github.com/mapbox/mapbox-gl-native/issues/3985)) +* Remove Adapter Requirement For MarkerView ([#5214](https://github.com/mapbox/mapbox-gl-native/issues/5214)) +* Always Current Version Style URL Constants ([#5193](https://github.com/mapbox/mapbox-gl-native/issues/5193)) +* Random NullPointerException On Telemetry ([#5186](https://github.com/mapbox/mapbox-gl-native/issues/5186)) + +## 4.1.0-beta.1 + +Mapbox Android 4.1.0 builds off our ambitious 4.0.0 version with 3 major new features being released. To help us produce the highest quality SDK possible we're releasing an official Beta release first so that everyone has time to explore it and help hardened it before the official 4.1.0 Final Release. + +* View Based Annotations ([#3276](https://github.com/mapbox/mapbox-gl-native/issues/3276)) +* UserLocationView Refactor ([#4396](https://github.com/mapbox/mapbox-gl-native/issues/4396)) +* MapboxAccountManager ([#5004](https://github.com/mapbox/mapbox-gl-native/issues/5004)) + ## 4.0.1 Mapbox Android 4.0.1 is a patch release to make this bug fix available sooner. diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Annotation.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Annotation.java index 36d56591c..3c4868c84 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Annotation.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/Annotation.java @@ -23,6 +23,7 @@ public abstract class Annotation implements Comparable { */ private long id = -1; // -1 unless added to a MapView protected MapboxMap mapboxMap; + protected MapView mapView; protected Annotation() { } @@ -68,6 +69,22 @@ public abstract class Annotation implements Comparable { return mapboxMap; } + /** + * Don not use this method. Used internally by the SDK. + */ + public void setMapView(MapView mapView) { + this.mapView = mapView; + } + + /** + * Gets the associated MapView + * + * @return The MapView + */ + protected MapView getMapView() { + return mapView; + } + @Override public int compareTo(@NonNull Annotation annotation) { if (id < annotation.getId()) { diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java index 0cd54fc0f..2a41fad23 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java @@ -1,7 +1,7 @@ package com.mapbox.mapboxsdk.annotations; import android.os.Parcelable; -import android.support.annotation.AnimatorRes; +import android.support.annotation.FloatRange; import android.support.annotation.NonNull; import com.mapbox.mapboxsdk.geometry.LatLng; @@ -26,10 +26,9 @@ public abstract class BaseMarkerViewOptions