From c15ff3619bb1c8ad87b82f477dc1f519937cfac7 Mon Sep 17 00:00:00 2001 From: h0pbeat Date: Sat, 9 Jan 2016 13:47:18 -0800 Subject: [PATCH] updated geofencer to properly use accepted location probes --- .../src/main/java/edu/mit/media/funf/data/Geofencer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/funf_v4/src/main/java/edu/mit/media/funf/data/Geofencer.java b/funf_v4/src/main/java/edu/mit/media/funf/data/Geofencer.java index a933bf3..4cbd3bc 100644 --- a/funf_v4/src/main/java/edu/mit/media/funf/data/Geofencer.java +++ b/funf_v4/src/main/java/edu/mit/media/funf/data/Geofencer.java @@ -40,9 +40,8 @@ public class Geofencer { private Set acceptedLocationProbes = - new HashSet(Arrays.asList("edu.mit.media.funf.probe.builtin.LocationProbe", "edu.mit.media.funf.probe.builtin.SimpleLocationProbe")); - - + new HashSet(Arrays.asList("edu.mit.media.funf.probe.builtin.LocationProbe", + "edu.mit.media.funf.probe.builtin.SimpleLocationProbe")); public Geofencer() { Log.i(LogUtil.TAG, "Creating geofencer " + version); @@ -68,7 +67,7 @@ public boolean shouldFire(String name) { private void updateVisits(String name, IJsonObject data) { - if (name.equals("edu.mit.media.funf.probe.builtin.LocationProbe")) { + if (acceptedLocationProbes.contains(name)) { Double accuracy = data.get("mAccuracy").getAsDouble(); Double lat = data.get("mLatitude").getAsDouble(); Double lon = data.get("mLongitude").getAsDouble();