From 7995b6e6a3de8cb9b4eeef1df0ec1d941da6a2b8 Mon Sep 17 00:00:00 2001 From: sonora Date: Sat, 28 Jan 2012 19:18:48 +0100 Subject: [PATCH] display switching-to-cloudmade notification in sync with other routing error messages only --- OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index d822b7f1fd..c7a4541314 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -462,7 +462,10 @@ public class RoutingHelper { if (serviceToUse == RouteService.OSMAND && !settings.USE_OSMAND_ROUTING_SERVICE_ALWAYS.get()) { double distance = MapUtils.getDistance(end, start.getLatitude(), start.getLongitude()); if (distance > DISTANCE_TO_USE_OSMAND_ROUTER) { - showMessage(context.getString(R.string.osmand_routing_experimental), Toast.LENGTH_LONG); + // display notification in sync with other routing error messages below + if (System.currentTimeMillis() - lastTimeEvaluatedRoute > evalWaitInterval) { + showMessage(context.getString(R.string.osmand_routing_experimental), Toast.LENGTH_LONG); + } serviceToUse = RouteService.CLOUDMADE; } }