diff options
author | Tobrun <tobrun@mapbox.com> | 2017-11-10 16:33:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-10 16:33:51 +0100 |
commit | a47f8245dacffad2b7f8f71a38b7eb41ee28b0b5 (patch) | |
tree | 86ad036c2c5c82961238a1e4b6d648decf9b7eec /platform/android/MapboxGLAndroidSDKTestApp/src/main/java | |
parent | 225fba8a0aad5ea52ff878443f58d65bb2221d74 (diff) | |
download | qtlocation-mapboxgl-a47f8245dacffad2b7f8f71a38b7eb41ee28b0b5.tar.gz |
Monkey crashes (#10440)
* [android] - avoid null map from trackballevent
* [android] - fixup animated marker test activity from monkey runs
* [android] - harden NativeMapView OnMapChangeListener
* [android] - harden against destroyed wrapper activity while moving touch pointers
* [android] - harden bulk marker activity for monkey runner
* [android] - harden scale end gesture event for null velocity tracker
* [android] - invalid mapboxMap invocation
* [android] - reset test setup
Diffstat (limited to 'platform/android/MapboxGLAndroidSDKTestApp/src/main/java')
2 files changed, 12 insertions, 6 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AnimatedMarkerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AnimatedMarkerActivity.java index 52181cee0c..d8752bbea2 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AnimatedMarkerActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/AnimatedMarkerActivity.java @@ -236,12 +236,14 @@ public class AnimatedMarkerActivity extends AppCompatActivity { stopped = true; - // Stop ongoing animations, prevent memory lekas - MarkerViewManager markerViewManager = mapboxMap.getMarkerViewManager(); - for (MarkerView markerView : markerViews) { - View view = markerViewManager.getView(markerView); - if (view != null) { - view.animate().cancel(); + // Stop ongoing animations, prevent memory leaks + if (mapboxMap != null) { + MarkerViewManager markerViewManager = mapboxMap.getMarkerViewManager(); + for (MarkerView markerView : markerViews) { + View view = markerViewManager.getView(markerView); + if (view != null) { + view.animate().cancel(); + } } } diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java index 50adeb2d74..666fd2eee6 100644 --- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java +++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/annotation/BulkMarkerActivity.java @@ -100,6 +100,10 @@ public class BulkMarkerActivity extends AppCompatActivity implements AdapterView } private void showMarkers(int amount) { + if (mapboxMap == null || locations == null) { + return; + } + mapboxMap.clear(); if (locations.size() < amount) { |