Commit 5244f8b2 authored by Chris Scott's avatar Chris Scott

it's possible for location-poller to still fire its last alarm if EXIT was...

it's possible for location-poller to still fire its last alarm if EXIT was determined via proximity-detector, if isMoving here, just bail out
parent 507dca93
...@@ -475,6 +475,9 @@ public class LocationUpdateService extends Service implements LocationListener { ...@@ -475,6 +475,9 @@ public class LocationUpdateService extends Service implements LocationListener {
} }
public void onPollStationaryLocation(Location location) { public void onPollStationaryLocation(Location location) {
if (isMoving) {
return;
}
startTone("beep"); startTone("beep");
float distance = location.distanceTo(stationaryLocation) - stationaryLocation.getAccuracy() - location.getAccuracy(); float distance = location.distanceTo(stationaryLocation) - stationaryLocation.getAccuracy() - location.getAccuracy();
Toast.makeText(this, "Stationary exit in " + (stationaryRadius-distance) + "m", Toast.LENGTH_LONG).show(); Toast.makeText(this, "Stationary exit in " + (stationaryRadius-distance) + "m", Toast.LENGTH_LONG).show();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment