diff --git a/OsmAnd-java/src/net/osmand/osm/io/OsmBaseStorage.java b/OsmAnd-java/src/net/osmand/osm/io/OsmBaseStorage.java index ac95b75cff..4d26dc772e 100644 --- a/OsmAnd-java/src/net/osmand/osm/io/OsmBaseStorage.java +++ b/OsmAnd-java/src/net/osmand/osm/io/OsmBaseStorage.java @@ -136,6 +136,10 @@ public class OsmBaseStorage extends DefaultHandler { } } + public boolean isOsmChange() { + return osmChange; + } + protected Long parseId(Attributes a, String name, long defId){ long id = defId; String value = a.getValue(name); diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java index a8a5d1b63a..ffe840350d 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java @@ -178,14 +178,12 @@ public class WaypointHelper { LocationPointWrapper lwp = lp.get(kIterator); if (lp.get(kIterator).routeIndex < route.getCurrentRoute()) { // skip - } else if (route.getDistanceToPoint(lwp.routeIndex) > LONG_ANNOUNCE_RADIUS / 2) { - break; } else { - AlarmInfo inf = (AlarmInfo) lwp.point; int d = route.getDistanceToPoint(lwp.routeIndex); if (d > LONG_ANNOUNCE_RADIUS) { break; } + AlarmInfo inf = (AlarmInfo) lwp.point; float speed = lastProjection != null && lastProjection.hasSpeed() ? lastProjection.getSpeed() : 0; float time = speed > 0 ? d / speed : Integer.MAX_VALUE; int vl = inf.updateDistanceAndGetPriority(time, d);