fix bug that 'Start simulation' is not hidden when dev plugoin is off

This commit is contained in:
sonora 2014-12-22 19:40:59 +01:00
parent 7c616c802c
commit ec9ad06df5

View file

@ -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() {