test longer SERVICE_OFF_INTERVALs for longer global GPX recording intervals
This commit is contained in:
parent
d625d9a292
commit
07ab3ecb00
2 changed files with 11 additions and 5 deletions
|
@ -851,7 +851,12 @@ public class OsmandApplication extends Application {
|
||||||
serviceIntent.putExtra(NavigationService.USAGE_INTENT, intent);
|
serviceIntent.putExtra(NavigationService.USAGE_INTENT, intent);
|
||||||
if (getNavigationService() == null) {
|
if (getNavigationService() == null) {
|
||||||
if (intent == NavigationService.USED_BY_GPX) {
|
if (intent == NavigationService.USED_BY_GPX) {
|
||||||
//Use pre-selected SERVICE_OFF_INTERVAL for global GPX recording, else
|
if (settings.SAVE_GLOBAL_TRACK_INTERVAL.set() < 30000) {
|
||||||
|
settings.SERVICE_OFF_INTERVAL.set(0);
|
||||||
|
} else {
|
||||||
|
//Use SERVICE_OFF_INTERVAL > 0 to conserve power for longer GPX recording intervals
|
||||||
|
settings.SERVICE_OFF_INTERVAL.set(settings.SAVE_GLOBAL_TRACK_INTERVAL.set());
|
||||||
|
}
|
||||||
getSettings().SERVICE_OFF_INTERVAL.set();
|
getSettings().SERVICE_OFF_INTERVAL.set();
|
||||||
} else {
|
} else {
|
||||||
getSettings().SERVICE_OFF_INTERVAL.set(0);
|
getSettings().SERVICE_OFF_INTERVAL.set(0);
|
||||||
|
|
|
@ -345,9 +345,10 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn
|
||||||
settings.SAVE_GLOBAL_TRACK_INTERVAL.set(vs.value);
|
settings.SAVE_GLOBAL_TRACK_INTERVAL.set(vs.value);
|
||||||
settings.SAVE_GLOBAL_TRACK_TO_GPX.set(true);
|
settings.SAVE_GLOBAL_TRACK_TO_GPX.set(true);
|
||||||
settings.SAVE_GLOBAL_TRACK_REMEMBER.set(choice.value);
|
settings.SAVE_GLOBAL_TRACK_REMEMBER.set(choice.value);
|
||||||
if (app.getNavigationService() == null) {
|
//interval setting not needed here, handled centrally in app.startNavigationService
|
||||||
settings.SERVICE_OFF_INTERVAL.set(0);
|
//if (app.getNavigationService() == null) {
|
||||||
}
|
// settings.SERVICE_OFF_INTERVAL.set(0);
|
||||||
|
//}
|
||||||
app.startNavigationService(NavigationService.USED_BY_GPX);
|
app.startNavigationService(NavigationService.USED_BY_GPX);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue