[android] fix added to map checks because LongSparseArray#indexOfKey could return a negative number when the specified key is not mapped (#9602)

This commit is contained in:
Pablo Guardiola
2017-07-25 13:01:31 +02:00
committed by Tobrun
parent beaee9349f
commit 635a3f21a0

View File

@@ -301,7 +301,7 @@ class AnnotationManager {
}
private boolean isAddedToMap(Annotation annotation) {
return annotation != null && annotation.getId() != -1 && annotations.indexOfKey(annotation.getId()) != -1;
return annotation != null && annotation.getId() != -1 && annotations.indexOfKey(annotation.getId()) > -1;
}
private void ensureIconLoaded(Marker marker) {