fix issue 234

git-svn-id: https://osmand.googlecode.com/svn/trunk@771 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-12-06 11:53:51 +00:00
parent e7d36586ca
commit bea0c7a112

View file

@ -55,10 +55,7 @@ public class NavigationService extends Service implements LocationListener {
LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
if(register){
boolean continuous = serviceOffInterval == 0;
if(continuous){
serviceOffInterval = OsmandSettings.getSavingTrackInterval(OsmandSettings.getPrefs(NavigationService.this)) * 1000;
}
locationManager.requestLocationUpdates(serviceOffProvider, serviceOffInterval, 0, NavigationService.this);
locationManager.requestLocationUpdates(serviceOffProvider, continuous? 1000 : serviceOffInterval, 0, NavigationService.this);
if(!continuous){
delayedAction(false, serviceError);
}