From 1f1fc02f42f34bcef194670a146eb019dafd6599 Mon Sep 17 00:00:00 2001 From: Zahnstocher Date: Wed, 27 Aug 2014 20:09:26 +0200 Subject: [PATCH 1/6] Remove wrong substring --- .../net/osmand/plus/activities/search/GeoIntentActivity.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java index 3c6b8a71f5..c1209f865b 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/GeoIntentActivity.java @@ -476,8 +476,7 @@ public class GeoIntentActivity extends OsmandListActivity { .replaceAll(" ", ","); System.out.println(query); //String is split on each comma - String[] s = query.substring(query - .indexOf("q=") + 2).split(","); + String[] s = query.split(","); elements = new ArrayList(); for (int i = 0; i Date: Wed, 27 Aug 2014 23:05:55 +0200 Subject: [PATCH 2/6] fix that manual adjustmaent of GPX wae-up was ignored --- OsmAnd/src/net/osmand/plus/OsmandApplication.java | 11 +++++------ .../plus/monitoring/OsmandMonitoringPlugin.java | 12 ++++++++---- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 942efcc87b..ae2e1f46b6 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -851,17 +851,16 @@ public class OsmandApplication extends Application { serviceIntent.putExtra(NavigationService.USAGE_INTENT, intent); if (getNavigationService() == null) { if (intent == NavigationService.USED_BY_GPX) { - if (getSettings().SAVE_GLOBAL_TRACK_INTERVAL.get() < 30000) { - getSettings().SERVICE_OFF_INTERVAL.set(0); - } else { - //Use SERVICE_OFF_INTERVAL > 0 to conserve power for longer GPX recording intervals - getSettings().SERVICE_OFF_INTERVAL.set(getSettings().SAVE_GLOBAL_TRACK_INTERVAL.get()); - } + //for only-USED_BY_GPX case use pre-configured SERVICE_OFF_INTERVAL + getSettings().SERVICE_OFF_INTERVAL.set(); } else { + //other cases always use "continuous" getSettings().SERVICE_OFF_INTERVAL.set(0); } startService(serviceIntent); } else { + //additional cases always use "continuous" + //TODO: fallback to custom USED_BY_GPX interval in case all other sleep mode purposes have been stopped getSettings().SERVICE_OFF_INTERVAL.set(0); getNavigationService().addUsageIntent(intent); } diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java index ad634312a3..9925cbd259 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java @@ -345,10 +345,14 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn settings.SAVE_GLOBAL_TRACK_INTERVAL.set(vs.value); settings.SAVE_GLOBAL_TRACK_TO_GPX.set(true); settings.SAVE_GLOBAL_TRACK_REMEMBER.set(choice.value); - //interval setting not needed here, handled centrally in app.startNavigationService - //if (app.getNavigationService() == null) { - // settings.SERVICE_OFF_INTERVAL.set(0); - //} + + if (settings.SAVE_GLOBAL_TRACK_INTERVAL.get() < 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.get()); + } + app.startNavigationService(NavigationService.USED_BY_GPX); } }; From 2b02a888e7f6324f846a63f7775b53d0953b61b0 Mon Sep 17 00:00:00 2001 From: sonora Date: Wed, 27 Aug 2014 23:16:52 +0200 Subject: [PATCH 3/6] fix build --- OsmAnd/src/net/osmand/plus/OsmandApplication.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index ae2e1f46b6..891932add6 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -850,11 +850,9 @@ 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) { + if (intent != NavigationService.USED_BY_GPX) { //for only-USED_BY_GPX case use pre-configured SERVICE_OFF_INTERVAL - getSettings().SERVICE_OFF_INTERVAL.set(); - } else { - //other cases always use "continuous" + //other cases always use "continuous": getSettings().SERVICE_OFF_INTERVAL.set(0); } startService(serviceIntent); From a41cc4b23251c745b1c62ef14b48b4cc889eda16 Mon Sep 17 00:00:00 2001 From: sonora Date: Wed, 27 Aug 2014 23:21:22 +0200 Subject: [PATCH 4/6] clean up obsolete comments --- .../plus/monitoring/OsmandMonitoringPlugin.java | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java index 9925cbd259..4f257a6360 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java @@ -198,11 +198,9 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn setText(txt, subtxt); setImageDrawable(d); - //if ((last != lastUpdateTime) && globalRecord) { if ((last != lastUpdateTime) && (globalRecord || isRecording)) { lastUpdateTime = last; - //blink(); - //test blink wuith 2 indicator states + //blink implementation with 2 indicator states (global logging + profile/navigation logging) setImageDrawable(monitoringInactive); invalidate(); postDelayed(new Runnable() { @@ -216,23 +214,10 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn invalidate(); } }, 500); - //end test } updateVisibility(visible); return true; } - -// private void blink() { -// setImageDrawable(monitoringSmall); -// invalidate(); -// postDelayed(new Runnable() { -// @Override -// public void run() { -// setImageDrawable(monitoringBig); -// invalidate(); -// } -// }, 500); -// } }; monitoringControl.updateInfo(null); From 23348962a1b48237cf86a10b51b492244ec5e8ca Mon Sep 17 00:00:00 2001 From: sonora Date: Wed, 27 Aug 2014 23:50:51 +0200 Subject: [PATCH 5/6] I guess we should not start the sleep mode service automatically upon app start --- OsmAnd/src/net/osmand/plus/OsmandApplication.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java index 891932add6..12e86ace85 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java +++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java @@ -560,8 +560,9 @@ public class OsmandApplication extends Application { } } } - if(getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get()){ - startNavigationService(NavigationService.USED_BY_GPX); + //I guess we should not start the sleep mode service automatically upon app start + //if(getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get()){ + // startNavigationService(NavigationService.USED_BY_GPX); } // restore backuped favorites to normal file final File appDir = getAppPath(null); From e898cf968826a63fa18e3bcf150dc19a45f99c15 Mon Sep 17 00:00:00 2001 From: Mirco Zorzo Date: Thu, 28 Aug 2014 00:15:10 +0200 Subject: [PATCH 6/6] Translated using Weblate (Italian) Currently translated at 100.0% (1511 of 1511 strings) --- OsmAnd/res/values-it/strings.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index 862eed4645..210757a379 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -1977,4 +1977,8 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz h Durata Distanza - + Registra la traccia in un file GPX + La registrazione della posizione in un file GPX può essere accesa o spenta dal widget registrazione GPX sulla schermata della mappa + Intervallo registrazione + Modo trasporto pubblico +