From 796961c273b3356311a021466fd4220a78a76a66 Mon Sep 17 00:00:00 2001 From: Hardy Date: Fri, 20 Jan 2017 20:08:15 +0100 Subject: [PATCH 1/2] Make all recording parameters global, due to MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit •The issue that parameters for an ongoing recording currently change unnoticed (behind the scenes) when people change app profile to check something on the map •Starting a recording from the new notification uses undefined/not evident parameterization --- .../src/net/osmand/plus/OsmandSettings.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index f91283862f..bf00c9a1a4 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -1060,24 +1060,24 @@ public class OsmandSettings { } // Please note that SAVE_TRACK_MIN_DISTANCE, SAVE_TRACK_PRECISION, SAVE_TRACK_MIN_SPEED should all be "0" for the default profile, as we have no interface to change them - public final CommonPreference SAVE_TRACK_MIN_DISTANCE = new FloatPreference("save_track_min_distance", 0).makeProfile(); - { - SAVE_TRACK_MIN_DISTANCE.setModeDefaultValue(ApplicationMode.CAR, 5.f); - SAVE_TRACK_MIN_DISTANCE.setModeDefaultValue(ApplicationMode.BICYCLE, 5.f); - SAVE_TRACK_MIN_DISTANCE.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 5.f); - } - public final CommonPreference SAVE_TRACK_PRECISION = new FloatPreference("save_track_precision", 0.f).makeProfile(); - { + public final CommonPreference SAVE_TRACK_MIN_DISTANCE = new FloatPreference("save_track_min_distance", 0).makeGlobal(); + //{ + // SAVE_TRACK_MIN_DISTANCE.setModeDefaultValue(ApplicationMode.CAR, 5.f); + // SAVE_TRACK_MIN_DISTANCE.setModeDefaultValue(ApplicationMode.BICYCLE, 5.f); + // SAVE_TRACK_MIN_DISTANCE.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 5.f); + //} + public final CommonPreference SAVE_TRACK_PRECISION = new FloatPreference("save_track_precision", 0.f).makeGlobal(); + //{ // SAVE_TRACK_PRECISION.setModeDefaultValue(ApplicationMode.CAR, 50.f); // SAVE_TRACK_PRECISION.setModeDefaultValue(ApplicationMode.BICYCLE, 50.f); // SAVE_TRACK_PRECISION.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 50.f); - } - public final CommonPreference SAVE_TRACK_MIN_SPEED = new FloatPreference("save_track_min_speed", 0.f).makeProfile(); - { - SAVE_TRACK_MIN_SPEED.setModeDefaultValue(ApplicationMode.CAR, 2.f); + //} + public final CommonPreference SAVE_TRACK_MIN_SPEED = new FloatPreference("save_track_min_speed", 0.f).makeGlobal(); + //{ + // SAVE_TRACK_MIN_SPEED.setModeDefaultValue(ApplicationMode.CAR, 2.f); SAVE_TRACK_MIN_SPEED.setModeDefaultValue(ApplicationMode.BICYCLE, 1.f); // SAVE_TRACK_MIN_SPEED.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 0.f); - } + //} public final CommonPreference AUTO_SPLIT_RECORDING = new BooleanPreference("auto_split_recording", true).makeGlobal(); public final CommonPreference SHOW_TRIP_REC_NOTIFICATION = new BooleanPreference("show_trip_recording_notification", true).makeGlobal(); From 2a654ee6b831020cc004d4eef7757a7bdee44f53 Mon Sep 17 00:00:00 2001 From: Hardy Date: Fri, 20 Jan 2017 20:15:58 +0100 Subject: [PATCH 2/2] Update OsmandSettings.java --- OsmAnd/src/net/osmand/plus/OsmandSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index bf00c9a1a4..c6c27f542b 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -1075,7 +1075,7 @@ public class OsmandSettings { public final CommonPreference SAVE_TRACK_MIN_SPEED = new FloatPreference("save_track_min_speed", 0.f).makeGlobal(); //{ // SAVE_TRACK_MIN_SPEED.setModeDefaultValue(ApplicationMode.CAR, 2.f); - SAVE_TRACK_MIN_SPEED.setModeDefaultValue(ApplicationMode.BICYCLE, 1.f); + // SAVE_TRACK_MIN_SPEED.setModeDefaultValue(ApplicationMode.BICYCLE, 1.f); // SAVE_TRACK_MIN_SPEED.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 0.f); //} public final CommonPreference AUTO_SPLIT_RECORDING = new BooleanPreference("auto_split_recording", true).makeGlobal();