diff --git a/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java b/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java index ede940c386..b4deade8e9 100644 --- a/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java +++ b/OsmAnd/src/net/osmand/plus/CurrentPositionHelper.java @@ -51,7 +51,12 @@ public class CurrentPositionHelper { ctx = new RoutePlannerFrontEnd(false).buildRoutingContext(cfg, null, app.getResourceManager().getRoutingMapFiles()); RoutingConfiguration defCfg = app.getDefaultRoutingConfig().build(GeneralRouterProfile.CAR.name().toLowerCase(), 10, new HashMap()); - defCtx = new RoutePlannerFrontEnd(false).buildRoutingContext(defCfg, null, app.getResourceManager().getRoutingMapFiles()); + BinaryMapIndexReader[] rs = new BinaryMapIndexReader[app.getResourceManager().getAddressRepositories().size()]; + int i = 0; + for (RegionAddressRepository rep : app.getResourceManager().getAddressRepositories()) { + rs[i++] = rep.getFile(); + } + defCtx = new RoutePlannerFrontEnd(false).buildRoutingContext(defCfg, null, rs); } diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index 73fd932879..76851e38bf 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -921,12 +921,10 @@ public class RoutingHelper { currentRunningJob = new Thread(new Runnable() { @Override public void run() { - synchronized (RoutingHelper.this) { - try { - r.run(); - } finally { - currentRunningJob = null; - } + try { + r.run(); + } finally { + currentRunningJob = null; } } }, "Calculating position"); //$NON-NLS-1$