From ec9ad06df5b50c807f72e5abc0fd86dcefa3f4a4 Mon Sep 17 00:00:00 2001 From: sonora Date: Mon, 22 Dec 2014 19:40:59 +0100 Subject: [PATCH] fix bug that 'Start simulation' is not hidden when dev plugoin is off --- .../net/osmand/plus/views/controls/MapRouteInfoControl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java b/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java index 740ebd2a7c..80d10268c8 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/MapRouteInfoControl.java @@ -12,6 +12,8 @@ import net.osmand.data.RotatedTileBox; import net.osmand.data.RotatedTileBox.RotatedTileBoxBuilder; import net.osmand.plus.OsmAndLocationProvider; import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandPlugin; +import net.osmand.plus.development.OsmandDevelopmentPlugin; import net.osmand.plus.R; import net.osmand.plus.TargetPointsHelper; import net.osmand.plus.TargetPointsHelper.TargetPoint; @@ -276,6 +278,9 @@ public class MapRouteInfoControl extends MapControls implements IRouteInformatio if(mapActivity.getRoutingHelper().isFollowingMode()) { simulateRoute.setVisibility(View.GONE); } + if (OsmandPlugin.getEnabledPlugin(OsmandDevelopmentPlugin.class) == null) { + simulateRoute.setVisibility(View.GONE); + } simulateRoute.setText(loc.getLocationSimulation().isRouteAnimating() ? R.string.animate_route_off : R.string.animate_route); simulateRoute.setOnClickListener(new View.OnClickListener() {