osmandapp/Osmand — pull request #643 by vrtareg (2014-05-19 12:16:46+00:00)
Title: Update SettingsGeneralActivity.java

Possible Fix for crashing when Opening the general Settings after changing back the Unit setting.

Victor could you please check if this correct?

Should the OsmAnd/src/net/osmand/plus/OsmandSettings.java be changed too?

@@ -638,7 +639,7 @@ protected boolean setValue(Object prefs, DrivingRegion val) {
// this value string is synchronized with settings_pref.xml preference name
// cache of metrics constants as they are used very often
public final OsmandPreference METRIC_SYSTEM = new EnumIntPreference(
-	"default_metric_system", MetricsConstants.KILOMETERS_AND_METERS, MetricsConstants.values()){
+	"default_metric_system_new", MetricsConstants.KILOMETERS_AND_METERS, MetricsConstants.values()){
protected MetricsConstants getDefaultValue() {
return DRIVING_REGION.get().defMetrics;
};

https://github.com/osmandapp/Osmand/commit/2ef5d3442b8e36119f8b7366d2659f92f03848e2