Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d625d9a292
3 changed files with 10 additions and 4 deletions
|
@ -198,7 +198,9 @@ public class NavigationService extends Service implements LocationListener {
|
||||||
//Show currently active wake-up interval
|
//Show currently active wake-up interval
|
||||||
int soi = settings.SERVICE_OFF_INTERVAL.get();
|
int soi = settings.SERVICE_OFF_INTERVAL.get();
|
||||||
String nt = getString(R.string.service_stop_background_service) + ". " + getString(R.string.gps_wake_up_timer) + ": ";
|
String nt = getString(R.string.service_stop_background_service) + ". " + getString(R.string.gps_wake_up_timer) + ": ";
|
||||||
if (soi <= 90000) {
|
if (soi == 0) {
|
||||||
|
nt = nt + getString(R.string.int_continuosly));
|
||||||
|
} else if (soi <= 90000) {
|
||||||
nt = nt + Integer.toString(soi/1000) + " " + getString(R.string.int_seconds);
|
nt = nt + Integer.toString(soi/1000) + " " + getString(R.string.int_seconds);
|
||||||
} else {
|
} else {
|
||||||
nt = nt + Integer.toString(soi/1000/60) + " " + getString(R.string.int_min);
|
nt = nt + Integer.toString(soi/1000/60) + " " + getString(R.string.int_min);
|
||||||
|
|
|
@ -850,8 +850,10 @@ public class OsmandApplication extends Application {
|
||||||
final Intent serviceIntent = new Intent(this, NavigationService.class);
|
final Intent serviceIntent = new Intent(this, NavigationService.class);
|
||||||
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
|
//Use pre-selected SERVICE_OFF_INTERVAL for global GPX recording, else
|
||||||
|
getSettings().SERVICE_OFF_INTERVAL.set();
|
||||||
|
} else {
|
||||||
getSettings().SERVICE_OFF_INTERVAL.set(0);
|
getSettings().SERVICE_OFF_INTERVAL.set(0);
|
||||||
}
|
}
|
||||||
startService(serviceIntent);
|
startService(serviceIntent);
|
||||||
|
|
|
@ -105,7 +105,9 @@ public class MapInfoWidgetsFactory {
|
||||||
|
|
||||||
//Show currently active wake-up interval
|
//Show currently active wake-up interval
|
||||||
int soi = app.getSettings().SERVICE_OFF_INTERVAL.get();
|
int soi = app.getSettings().SERVICE_OFF_INTERVAL.get();
|
||||||
if (soi <= 90000) {
|
if (soi == 0) {
|
||||||
|
dlg.setMessage(app.getString(R.string.gps_wake_up_timer) + ": " + app.getString(R.string.int_continuosly));
|
||||||
|
} else if (soi <= 90000) {
|
||||||
dlg.setMessage(app.getString(R.string.gps_wake_up_timer) + ": " + Integer.toString(soi/1000) + " " + app.getString(R.string.int_seconds));
|
dlg.setMessage(app.getString(R.string.gps_wake_up_timer) + ": " + Integer.toString(soi/1000) + " " + app.getString(R.string.int_seconds));
|
||||||
} else {
|
} else {
|
||||||
dlg.setMessage(app.getString(R.string.gps_wake_up_timer) + ": " + Integer.toString(soi/1000/60) + " " + app.getString(R.string.int_min));
|
dlg.setMessage(app.getString(R.string.gps_wake_up_timer) + ": " + Integer.toString(soi/1000/60) + " " + app.getString(R.string.int_min));
|
||||||
|
|
Loading…
Reference in a new issue