Add check for appModeKey
This commit is contained in:
parent
1b9fbc5792
commit
a0342f9548
1 changed files with 2 additions and 4 deletions
|
@ -231,10 +231,8 @@ public class AvoidSpecificRoads {
|
||||||
ll.setLongitude(loc.getLongitude());
|
ll.setLongitude(loc.getLongitude());
|
||||||
|
|
||||||
ApplicationMode defaultAppMode = app.getRoutingHelper().getAppMode();
|
ApplicationMode defaultAppMode = app.getRoutingHelper().getAppMode();
|
||||||
final ApplicationMode appMode = ApplicationMode.valueOfStringKey(appModeKey, defaultAppMode);
|
final ApplicationMode appMode = appModeKey != null ? ApplicationMode.valueOfStringKey(appModeKey, defaultAppMode) : defaultAppMode;
|
||||||
if (appMode == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
List<RouteSegmentResult> roads = app.getRoutingHelper().getRoute().getOriginalRoute();
|
List<RouteSegmentResult> roads = app.getRoutingHelper().getRoute().getOriginalRoute();
|
||||||
if (mapActivity != null && roads != null) {
|
if (mapActivity != null && roads != null) {
|
||||||
RotatedTileBox tb = mapActivity.getMapView().getCurrentRotatedTileBox().copy();
|
RotatedTileBox tb = mapActivity.getMapView().getCurrentRotatedTileBox().copy();
|
||||||
|
|
Loading…
Reference in a new issue