Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-08-26 22:56:09 +02:00
commit 461c67b2b3

View file

@ -850,7 +850,12 @@ public class OsmandApplication extends Application {
final Intent serviceIntent = new Intent(this, NavigationService.class);
serviceIntent.putExtra(NavigationService.USAGE_INTENT, intent);
if (getNavigationService() == null) {
getSettings().SERVICE_OFF_INTERVAL.set(0);
if (intent == NavigationService.USED_BY_GPX) {
//Use pre-selected SERVICE_OFF_INTERVAL for global GPX recording
getSettings().SERVICE_OFF_INTERVAL.set();
} else {
getSettings().SERVICE_OFF_INTERVAL.set(0);
}
startService(serviceIntent);
} else {
getNavigationService().addUsageIntent(intent);