small cosmetics

This commit is contained in:
sonora 2014-09-10 22:01:37 +02:00
parent 6203aaa759
commit e6d906617e

View file

@ -311,18 +311,15 @@ public class WaypointHelper {
point.getLatitude(), point.getLongitude()) - lwp.getDeviationDistance()); point.getLatitude(), point.getLongitude()) - lwp.getDeviationDistance());
Integer state = locationPointsStates.get(point); Integer state = locationPointsStates.get(point);
if (state != null && state.intValue() == ANNOUNCED_ONCE if (state != null && state.intValue() == ANNOUNCED_ONCE
&& getVoiceRouter() && getVoiceRouter().isDistanceLess(lastKnownLocation.getSpeed(), d1, SHORT_ANNOUNCE_RADIUS)) {
.isDistanceLess(lastKnownLocation.getSpeed(), d1, SHORT_ANNOUNCE_RADIUS)) {
locationPointsStates.put(point, ANNOUNCED_DONE); locationPointsStates.put(point, ANNOUNCED_DONE);
announcePoints.add(lwp); announcePoints.add(lwp);
} else if (type != ALARMS && (state == null || state == NOT_ANNOUNCED) } else if (type != ALARMS && (state == null || state == NOT_ANNOUNCED)
&& getVoiceRouter() && getVoiceRouter().isDistanceLess(lastKnownLocation.getSpeed(), d1, LONG_ANNOUNCE_RADIUS)) {
.isDistanceLess(lastKnownLocation.getSpeed(), d1, LONG_ANNOUNCE_RADIUS)) {
locationPointsStates.put(point, ANNOUNCED_ONCE); locationPointsStates.put(point, ANNOUNCED_ONCE);
approachPoints.add(lwp); approachPoints.add(lwp);
} else if (type == ALARMS && (state == null || state == NOT_ANNOUNCED) } else if (type == ALARMS && (state == null || state == NOT_ANNOUNCED)
&& getVoiceRouter() && getVoiceRouter().isDistanceLess(lastKnownLocation.getSpeed(), d1, ALARMS_ANNOUNCE_RADIUS)) {
.isDistanceLess(lastKnownLocation.getSpeed(), d1, ALARMS_ANNOUNCE_RADIUS)) {
locationPointsStates.put(point, ANNOUNCED_ONCE); locationPointsStates.put(point, ANNOUNCED_ONCE);
approachPoints.add(lwp); approachPoints.add(lwp);
} }