aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Settings.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/Settings.java')
-rw-r--r--main/src/cgeo/geocaching/Settings.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/Settings.java b/main/src/cgeo/geocaching/Settings.java
index 7fdf651..75faa49 100644
--- a/main/src/cgeo/geocaching/Settings.java
+++ b/main/src/cgeo/geocaching/Settings.java
@@ -7,6 +7,7 @@ import cgeo.geocaching.maps.MapProviderFactory;
import cgeo.geocaching.maps.interfaces.MapProvider;
import cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider;
import cgeo.geocaching.utils.CryptUtils;
+import cgeo.geocaching.utils.Log;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
@@ -117,11 +118,9 @@ public final class Settings {
private static final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(cgeoapplication.getInstance().getBaseContext());
static {
migrateSettings();
+ Log.setDebugUnsaved(sharedPrefs.getBoolean(KEY_DEBUG, false));
}
- // Debug settings are accessed often enough to be cached
- private static Boolean cachedDebug = sharedPrefs.getBoolean(KEY_DEBUG, false);
-
// maps
private static MapProvider mapProvider = null;
@@ -197,7 +196,6 @@ public final class Settings {
e.putInt(KEY_SETTINGS_VERSION, 1) ; // mark migrated
e.commit();
- cachedDebug = sharedPrefs.getBoolean(KEY_DEBUG, false);
}
}
@@ -1087,7 +1085,7 @@ public final class Settings {
public static boolean isDebug() {
- return cachedDebug;
+ return Log.isDebug();
}
public static void setDebug(final boolean debug) {
@@ -1097,7 +1095,7 @@ public final class Settings {
edit.putBoolean(KEY_DEBUG, debug);
}
});
- cachedDebug = debug;
+ Log.setDebugUnsaved(debug);
}
public static boolean getHideLiveMapHint() {