Show restore routing dialog after initialization
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
index be741dd..e43df10 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java
@@ -421,13 +421,7 @@
refreshMap();
}
if (event == InitEvents.ROUTING_CONFIG_INITIALIZED) {
- // This situation could be when navigation suddenly crashed and after restarting
- // it tries to continue the last route
- if (settings.FOLLOW_THE_ROUTE.get()
- && !app.getRoutingHelper().isRouteCalculated()
- && !app.getRoutingHelper().isRouteBeingCalculated()) {
- FailSafeFuntions.restoreRoutingMode(MapActivity.this);
- }
+ checkRestoreRoutingMode();
}
}
@@ -447,6 +441,17 @@
getMyApplication().checkApplicationIsBeingInitialized(this, initListener);
} else {
setupOpenGLView(true);
+ checkRestoreRoutingMode();
+ }
+ }
+
+ private void checkRestoreRoutingMode() {
+ // This situation could be when navigation suddenly crashed and after restarting
+ // it tries to continue the last route
+ if (settings.FOLLOW_THE_ROUTE.get()
+ && !app.getRoutingHelper().isRouteCalculated()
+ && !app.getRoutingHelper().isRouteBeingCalculated()) {
+ FailSafeFuntions.restoreRoutingMode(MapActivity.this);
}
}