Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-08-27 20:51:57 +02:00
commit d625d9a292
3 changed files with 10 additions and 4 deletions

View file

@ -198,7 +198,9 @@ public class NavigationService extends Service implements LocationListener {
//Show currently active wake-up interval
int soi = settings.SERVICE_OFF_INTERVAL.get();
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);
} else {
nt = nt + Integer.toString(soi/1000/60) + " " + getString(R.string.int_min);

View file

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

View file

@ -105,7 +105,9 @@ public class MapInfoWidgetsFactory {
//Show currently active wake-up interval
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));
} else {
dlg.setMessage(app.getString(R.string.gps_wake_up_timer) + ": " + Integer.toString(soi/1000/60) + " " + app.getString(R.string.int_min));