diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index 6db6f11c12..00dd5af656 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -567,7 +567,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven : ContextCompat.getColor(this, R.color.wikivoyage_active_light); pb.setProgressDrawable(AndroidUtils.createProgressDrawable(bgColor, progressColor)); - pb.setIndeterminate(getRoutingHelper().getAppMode() == ApplicationMode.PUBLIC_TRANSPORT); + pb.setIndeterminate(getRoutingHelper().isPublicTransportMode()); pb.getIndeterminateDrawable().setColorFilter(progressColor, android.graphics.PorterDuff.Mode.SRC_IN); } diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java index 340ef6dcc9..b4923d3e39 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenu.java @@ -950,7 +950,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener View startButton = mainView.findViewById(R.id.start_button); TextViewExProgress startButtonText = (TextViewExProgress) mainView.findViewById(R.id.start_button_descr); ProgressBar progressBar = (ProgressBar) mainView.findViewById(R.id.progress_bar_button); - boolean publicTransportMode = helper.getAppMode() == ApplicationMode.PUBLIC_TRANSPORT; + boolean publicTransportMode = helper.isPublicTransportMode(); boolean routeCalculated = isRouteCalculated(); int iconId = publicTransportMode ? R.drawable.ic_map : R.drawable.ic_action_start_navigation; int color1; diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java index c2fd41d991..810ea4ad6e 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java @@ -357,7 +357,7 @@ public class MapRouteInfoMenuFragment extends ContextMenuFragment { private boolean isPublicTransportMode() { OsmandApplication app = getMyApplication(); - return app != null && app.getRoutingHelper().getAppMode() == ApplicationMode.PUBLIC_TRANSPORT; + return app != null && app.getRoutingHelper().isPublicTransportMode(); } public void updateRouteCalculationProgress(int progress) { diff --git a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java index f8b3b13846..d16628b632 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java +++ b/OsmAnd/src/net/osmand/plus/routing/RoutingHelper.java @@ -1162,7 +1162,7 @@ public class RoutingHelper { } public boolean isPublicTransportMode() { - return mode == ApplicationMode.PUBLIC_TRANSPORT; + return mode.isDerivedRoutingFrom(ApplicationMode.PUBLIC_TRANSPORT); } public boolean isRouteBeingCalculated() {