fix issue 234
git-svn-id: https://osmand.googlecode.com/svn/trunk@771 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
e7d36586ca
commit
bea0c7a112
1 changed files with 1 additions and 4 deletions
|
@ -55,10 +55,7 @@ public class NavigationService extends Service implements LocationListener {
|
||||||
LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
|
LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
|
||||||
if(register){
|
if(register){
|
||||||
boolean continuous = serviceOffInterval == 0;
|
boolean continuous = serviceOffInterval == 0;
|
||||||
if(continuous){
|
locationManager.requestLocationUpdates(serviceOffProvider, continuous? 1000 : serviceOffInterval, 0, NavigationService.this);
|
||||||
serviceOffInterval = OsmandSettings.getSavingTrackInterval(OsmandSettings.getPrefs(NavigationService.this)) * 1000;
|
|
||||||
}
|
|
||||||
locationManager.requestLocationUpdates(serviceOffProvider, serviceOffInterval, 0, NavigationService.this);
|
|
||||||
if(!continuous){
|
if(!continuous){
|
||||||
delayedAction(false, serviceError);
|
delayedAction(false, serviceError);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue