forked from organicmaps/organicmaps
[android] Fixed on map search results
This commit is contained in:
parent
8c35177d52
commit
192e067b15
2 changed files with 20 additions and 7 deletions
|
@ -945,7 +945,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
}
|
||||
|
||||
if (!closePlacePage() && !closeSidePanel() &&
|
||||
!RoutingController.get().cancel() && !closePositionChooser())
|
||||
(mNavigationController != null && !mNavigationController.cancel()) && !closePositionChooser())
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
@ -133,10 +133,7 @@ public class NavigationController
|
|||
{
|
||||
case STOP:
|
||||
RoutingController.get().cancel();
|
||||
Statistics.INSTANCE.trackEvent(Statistics.EventName.ROUTING_CLOSE);
|
||||
AlohaHelper.logClick(AlohaHelper.ROUTING_CLOSE);
|
||||
parent.refreshFade();
|
||||
mSearchWheel.reset();
|
||||
stop(parent);
|
||||
break;
|
||||
case SETTINGS:
|
||||
parent.closeMenu(Statistics.EventName.ROUTING_SETTINGS, AlohaHelper.MENU_SETTINGS, new Runnable()
|
||||
|
@ -162,6 +159,14 @@ public class NavigationController
|
|||
});
|
||||
}
|
||||
|
||||
private void stop(MwmActivity parent)
|
||||
{
|
||||
Statistics.INSTANCE.trackEvent(Statistics.EventName.ROUTING_CLOSE);
|
||||
AlohaHelper.logClick(AlohaHelper.ROUTING_CLOSE);
|
||||
parent.refreshFade();
|
||||
mSearchWheel.reset();
|
||||
}
|
||||
|
||||
private void updateVehicle(RoutingInfo info)
|
||||
{
|
||||
mNextTurnDistance.setText(Utils.formatUnitsText(mFrame.getContext(),
|
||||
|
@ -282,8 +287,6 @@ public class NavigationController
|
|||
UiUtils.showIf(show, mFrame);
|
||||
UiUtils.showIf(show, mSearchButtonFrame);
|
||||
mNavMenu.show(show);
|
||||
if (!show)
|
||||
mSearchWheel.reset();
|
||||
}
|
||||
|
||||
public NavMenu getNavMenu()
|
||||
|
@ -301,4 +304,14 @@ public class NavigationController
|
|||
mShowTimeLeft = savedInstanceState.getBoolean(STATE_SHOW_TIME_LEFT);
|
||||
}
|
||||
|
||||
public boolean cancel()
|
||||
{
|
||||
if (RoutingController.get().cancel())
|
||||
{
|
||||
final MwmActivity parent = ((MwmActivity) mFrame.getContext());
|
||||
stop(parent);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue