[android] added ignore geofence registration when local ads object absent

This commit is contained in:
Dmitry Donskoy 2018-12-19 12:08:22 +03:00 committed by Aleksandr Zatsepin
parent 5be2163312
commit f217ae4e18

View file

@ -46,6 +46,8 @@ public class GeofenceRegistryImpl implements GeofenceRegistry
List<GeoFenceFeature> features = LightFramework.getLocalAdsFeatures(
location.getLat(), location.getLon(), location.getRadiusInMeters()/* from system location provider accuracy */, GEOFENCE_MAX_COUNT);
if (features.isEmpty())
return;
for (GeoFenceFeature each : features)
{
Geofence geofence = new Geofence.Builder()