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:
authoralexzatsepin <az@mapswithme.com>2016-12-12 18:14:20 +0300
committeralexzatsepin <az@mapswithme.com>2016-12-12 18:14:20 +0300
commitd4d75957993f155ca8d885392ad8a697241f2a8a (patch)
tree83f0da74d1ce0c6b8ba03a4ea80e54cc21b8a65e /android
parentced9f3bb904916d378b935208a384cde87a72759 (diff)
[android] Fixed fadingIn/fadingOut in routing mode
Diffstat (limited to 'android')
-rw-r--r--android/src/com/mapswithme/maps/MwmActivity.java19
-rw-r--r--android/src/com/mapswithme/maps/routing/NavigationController.java8
-rw-r--r--android/src/com/mapswithme/maps/routing/RoutingController.java7
3 files changed, 22 insertions, 12 deletions
diff --git a/android/src/com/mapswithme/maps/MwmActivity.java b/android/src/com/mapswithme/maps/MwmActivity.java
index 7b9c8df85f..81b00e1a0c 100644
--- a/android/src/com/mapswithme/maps/MwmActivity.java
+++ b/android/src/com/mapswithme/maps/MwmActivity.java
@@ -867,7 +867,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
}
});
mOnmapDownloader.onResume();
- mNavigationController.onResume();
+ if (mNavigationController != null)
+ mNavigationController.onResume();
}
@Override
@@ -1078,7 +1079,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
private BaseMenu getCurrentMenu()
{
- return (RoutingController.get().isNavigating() ? mNavigationController.getNavMenu() : mMainMenu);
+ return (RoutingController.get().isNavigating() && mNavigationController != null
+ ? mNavigationController.getNavMenu() : mMainMenu);
}
private void setFullscreen(boolean isFullscreen)
@@ -1357,7 +1359,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
if (RoutingController.get().isNavigating())
{
- mNavigationController.show(true);
+ if (mNavigationController != null)
+ mNavigationController.show(true);
mSearchController.hide();
mMainMenu.setState(MainMenu.State.NAVIGATION, false, mIsFullscreen);
return;
@@ -1489,7 +1492,9 @@ public class MwmActivity extends BaseMwmFragmentActivity
public void showNavigation(boolean show)
{
mPlacePage.refreshViews();
- mNavigationController.show(show);
+ if (mNavigationController != null)
+ mNavigationController.show(show);
+ refreshFade();
mOnmapDownloader.updateState(false);
adjustCompass(UiUtils.getCompassYOffset(this));
}
@@ -1576,7 +1581,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
if (!RoutingController.get().isNavigating())
return;
- mNavigationController.update(Framework.nativeGetRouteFollowingInfo());
+ if (mNavigationController != null)
+ mNavigationController.update(Framework.nativeGetRouteFollowingInfo());
TtsPlayer.INSTANCE.playTurnNotifications();
}
@@ -1586,7 +1592,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
{
MapFragment.nativeCompassUpdated(compass.getMagneticNorth(), compass.getTrueNorth(), false);
mPlacePage.refreshAzimuth(compass.getNorth());
- mNavigationController.updateNorth(compass.getNorth());
+ if (mNavigationController != null)
+ mNavigationController.updateNorth(compass.getNorth());
}
@Override
diff --git a/android/src/com/mapswithme/maps/routing/NavigationController.java b/android/src/com/mapswithme/maps/routing/NavigationController.java
index 79f14b8e58..cc3412e26b 100644
--- a/android/src/com/mapswithme/maps/routing/NavigationController.java
+++ b/android/src/com/mapswithme/maps/routing/NavigationController.java
@@ -12,10 +12,6 @@ import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
-import java.text.DateFormat;
-import java.util.Calendar;
-import java.util.concurrent.TimeUnit;
-
import com.mapswithme.maps.Framework;
import com.mapswithme.maps.MwmActivity;
import com.mapswithme.maps.R;
@@ -32,6 +28,10 @@ import com.mapswithme.util.Utils;
import com.mapswithme.util.statistics.AlohaHelper;
import com.mapswithme.util.statistics.Statistics;
+import java.text.DateFormat;
+import java.util.Calendar;
+import java.util.concurrent.TimeUnit;
+
public class NavigationController implements TrafficManager.TrafficCallback
{
private static final String STATE_SHOW_TIME_LEFT = "ShowTimeLeft";
diff --git a/android/src/com/mapswithme/maps/routing/RoutingController.java b/android/src/com/mapswithme/maps/routing/RoutingController.java
index e4e89c98c1..da4d551d62 100644
--- a/android/src/com/mapswithme/maps/routing/RoutingController.java
+++ b/android/src/com/mapswithme/maps/routing/RoutingController.java
@@ -750,8 +750,11 @@ public class RoutingController
Statistics.INSTANCE.trackEvent(Statistics.EventName.ROUTING_SEARCH_POINT);
AlohaHelper.logClick(AlohaHelper.ROUTING_SEARCH_POINT);
mWaitingPoiPickSlot = slotId;
- mContainer.showSearch();
- mContainer.updateMenu();
+ if (mContainer != null)
+ {
+ mContainer.showSearch();
+ mContainer.updateMenu();
+ }
}
private void onPoiSelectedInternal(@Nullable MapObject point, int slot)