Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Romanov <rromanov@65gb.net>2017-07-05 10:02:14 +0300
committerAleksandr Zatsepin <alexzatsepin@users.noreply.github.com>2017-07-05 21:55:28 +0300
commit06e06afa7a33bb5eff00a3611b32840a08354672 (patch)
treeed4387c235e800776542dcdd4157aef0e3b3a12d
parentec2778a3dbf233b7bfe34c1e6ad2b2227085e7cc (diff)
[android] return to planing state from navigating state if add/remove stopbeta-897
-rw-r--r--android/src/com/mapswithme/maps/routing/RoutingController.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/android/src/com/mapswithme/maps/routing/RoutingController.java b/android/src/com/mapswithme/maps/routing/RoutingController.java
index 6171b5b0ea..3557f9ff6c 100644
--- a/android/src/com/mapswithme/maps/routing/RoutingController.java
+++ b/android/src/com/mapswithme/maps/routing/RoutingController.java
@@ -442,6 +442,8 @@ public class RoutingController implements TaxiManager.TaxiListener
build();
if (mContainer != null)
mContainer.onAddedStop();
+
+ backToPlaningStateIfNavigating();
}
public void removeStop(@NonNull MapObject mapObject)
@@ -458,6 +460,23 @@ public class RoutingController implements TaxiManager.TaxiListener
build();
if (mContainer != null)
mContainer.onRemovedStop();
+
+ backToPlaningStateIfNavigating();
+ }
+
+ private void backToPlaningStateIfNavigating()
+ {
+ if (!isNavigating())
+ return;
+
+ setState(State.PREPARE);
+ if (mContainer != null)
+ {
+ mContainer.showNavigation(false);
+ mContainer.showRoutePlan(true, null);
+ mContainer.updateMenu();
+ mContainer.onNavigationCancelled();
+ }
}
public void removeIntermediatePoints()