[iOS] Background location update activates in route planning mode

https://jira.mail.ru/browse/MAPSME-14665
This commit is contained in:
Alexander Boriskov 2020-08-27 12:37:45 +03:00 committed by Maksim Andrianov
parent 5b4964a1eb
commit 905e036fbd

View file

@ -82,10 +82,9 @@ BOOL keepRunningInBackground()
if (needGPSForTrackRecorder)
return YES;
auto const isRouteBuilt = [MWMRouter isRouteBuilt];
auto const isOnRoute = [MWMRouter isOnRoute];
auto const isRouteFinished = [MWMRouter isRouteFinished];
auto const isRouteRebuildingOnly = [MWMRouter isRouteRebuildingOnly];
auto const needGPSForRouting = ((isRouteBuilt || isRouteRebuildingOnly) && !isRouteFinished);
auto const needGPSForRouting = (isOnRoute && !isRouteFinished);
if (needGPSForRouting)
return YES;