From d2076d406fa959769d19879b6a246dc959d51edc Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 26 Apr 2019 22:22:52 +0200 Subject: [PATCH 1/2] disable Network provider to avoid crazy marker traces --- .../securesms/geolocation/LocationBackgroundService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/geolocation/LocationBackgroundService.java b/src/org/thoughtcrime/securesms/geolocation/LocationBackgroundService.java index 8ae613414..172f31fcb 100644 --- a/src/org/thoughtcrime/securesms/geolocation/LocationBackgroundService.java +++ b/src/org/thoughtcrime/securesms/geolocation/LocationBackgroundService.java @@ -46,7 +46,7 @@ public class LocationBackgroundService extends Service { } locationListener = new ServiceLocationListener(); - requestLocationUpdate(LocationManager.NETWORK_PROVIDER); + //requestLocationUpdate(LocationManager.NETWORK_PROVIDER); requestLocationUpdate(LocationManager.GPS_PROVIDER); initialLocationUpdate(); } From 64a9f85a347dad6782117ecde209371430984283 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 26 Apr 2019 22:23:38 +0200 Subject: [PATCH 2/2] check if mapview is destroyed before removing markers --- src/org/thoughtcrime/securesms/map/MarkerViewManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/thoughtcrime/securesms/map/MarkerViewManager.java b/src/org/thoughtcrime/securesms/map/MarkerViewManager.java index 390441f50..326318465 100644 --- a/src/org/thoughtcrime/securesms/map/MarkerViewManager.java +++ b/src/org/thoughtcrime/securesms/map/MarkerViewManager.java @@ -83,6 +83,10 @@ public class MarkerViewManager implements MapView.OnDidFinishRenderingFrameListe } public void removeMarkers() { + if (mapView.isDestroyed()) { + return; + } + for (MarkerView markerView : markers) { mapView.removeView(markerView.getView()); }