From 624b897a6c9bf9ff50a557e15d8bf1ad19a5c275 Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Mon, 17 Sep 2018 17:07:29 +0300 Subject: [PATCH] Refactor RouteService --- .../net/osmand/plus/routing/RouteProvider.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index a73298f615..831af51902 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -79,14 +79,16 @@ public class RouteProvider { private static final int MIN_DISTANCE_FOR_INSERTING_ROUTE_SEGMENT = 60; public enum RouteService { - OSMAND("OsmAnd (offline)"), YOURS("YOURS"), -// ORS("OpenRouteService"), // disable ors due to no public rest service (testing2015 doesn't seem stable) - OSRM("OSRM (only car)"), - BROUTER("BRouter (offline)"), STRAIGHT("Straight line"); + OSMAND("OsmAnd (offline)"), + YOURS("YOURS"), + //ORS("OpenRouteService"), // disable ors due to no public rest service (testing2015 doesn't seem stable) + OSRM("OSRM (only car)"), + BROUTER("BRouter (offline)"), + STRAIGHT("Straight line"); private final String name; - private RouteService(String name) { + RouteService(String name) { this.name = name; } @@ -106,8 +108,8 @@ public class RouteProvider { } public static RouteService[] getAvailableRouters(OsmandApplication ctx) { - List list = new ArrayList(); - for(RouteService r : values()) { + List list = new ArrayList<>(); + for (RouteService r : values()) { if (r.isAvailable(ctx)) { list.add(r); }