diff options
author | Dmitry Yunitsky <yunik@mapswithme.com> | 2016-02-08 13:12:15 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:16:58 +0300 |
commit | 0d52d5a922a5fddec95b912da036b27d1b53b870 (patch) | |
tree | aab5eed84907bb31a49aea391f376fe3faaf073e | |
parent | e62e90f89f04225e08cd276ada95a86bdf6fc06e (diff) |
[android] Removed unnecessary mapobject refresh on activity resume. Callback from core should be fired instead.
-rw-r--r-- | android/src/com/mapswithme/maps/MwmActivity.java | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/android/src/com/mapswithme/maps/MwmActivity.java b/android/src/com/mapswithme/maps/MwmActivity.java index 12395921a1..90f2edaaf1 100644 --- a/android/src/com/mapswithme/maps/MwmActivity.java +++ b/android/src/com/mapswithme/maps/MwmActivity.java @@ -639,10 +639,7 @@ public class MwmActivity extends BaseMwmFragmentActivity super.onRestoreInstanceState(savedInstanceState); if (savedInstanceState.getBoolean(STATE_PP_OPENED)) - { - mPlacePage.setMapObject(Framework.nativeGetActiveMapObject(), false); mPlacePage.setState(State.PREVIEW); - } if (!mIsFragmentContainer && RoutingController.get().isPlanning()) mRoutingPlanInplaceController.restoreState(savedInstanceState); @@ -784,7 +781,6 @@ public class MwmActivity extends BaseMwmFragmentActivity invalidateLocationState(); mSearchController.refreshToolbar(); - mPlacePage.setMapObject(Framework.nativeGetActiveMapObject(), true); if (!RoutingController.get().isNavigating()) { @@ -1033,17 +1029,15 @@ public class MwmActivity extends BaseMwmFragmentActivity object.setTypeName(request.getCallerName(MwmApplication.get()).toString()); } - else if (MapObject.isOfType(MapObject.MY_POSITION, object)) + else if (MapObject.isOfType(MapObject.MY_POSITION, object) && + Framework.nativeIsRoutingActive()) { - if (Framework.nativeIsRoutingActive()) - return; + return; } setFullscreen(false); - if (MapObject.same(mPlacePage.getMapObject(), object)) - return; - mPlacePage.setMapObject(object, false); + mPlacePage.setMapObject(object, true); mPlacePage.setState(State.PREVIEW); if (UiUtils.isVisible(mFadeView)) |