summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationServices.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationServices.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationServices.java
index 74a68c3722..ac2ab64076 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationServices.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/location/LocationServices.java
@@ -117,7 +117,9 @@ public class LocationServices implements com.mapzen.android.lost.api.LocationLis
* @param locationListener LocationListener
*/
public void addLocationListener(@NonNull LocationListener locationListener) {
- this.locationListeners.add(locationListener);
+ if(!this.locationListeners.contains(locationListener)){
+ this.locationListeners.add(locationListener);
+ }
}
/**