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.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/Settings.java b/main/src/cgeo/geocaching/Settings.java
index 70d6851..e610844 100644
--- a/main/src/cgeo/geocaching/Settings.java
+++ b/main/src/cgeo/geocaching/Settings.java
@@ -91,6 +91,7 @@ public final class Settings {
private static final String KEY_SETTINGS_VERSION = "settingsversion";
private static final String KEY_DB_ON_SDCARD = "dbonsdcard";
private static final String KEY_LAST_TRACKABLE_ACTION = "trackableaction";
+ private static final String KEY_SHARE_AFTER_EXPORT = "shareafterexport";
private final static int unitsMetric = 1;
@@ -199,7 +200,7 @@ public final class Settings {
e.putBoolean(KEY_HIDE_LIVE_MAP_HINT, old.getInt(KEY_HIDE_LIVE_MAP_HINT, 0) != 0);
e.putInt(KEY_LIVE_MAP_HINT_SHOW_COUNT, old.getInt(KEY_LIVE_MAP_HINT_SHOW_COUNT, 0));
- e.putInt(KEY_SETTINGS_VERSION, 1) ; // mark migrated
+ e.putInt(KEY_SETTINGS_VERSION, 1); // mark migrated
e.commit();
}
}
@@ -1089,7 +1090,6 @@ public final class Settings {
});
}
-
public static boolean isDebug() {
return Log.isDebug();
}
@@ -1097,7 +1097,8 @@ public final class Settings {
public static void setDebug(final boolean debug) {
editSharedSettings(new PrefRunnable() {
- @Override public void edit(Editor edit) {
+ @Override
+ public void edit(Editor edit) {
edit.putBoolean(KEY_DEBUG, debug);
}
});
@@ -1138,7 +1139,6 @@ public final class Settings {
public static void setDbOnSDCard(final boolean dbOnSDCard) {
editSharedSettings(new PrefRunnable() {
-
@Override
public void edit(Editor edit) {
edit.putBoolean(KEY_DB_ON_SDCARD, dbOnSDCard);
@@ -1146,6 +1146,15 @@ public final class Settings {
});
}
+ public static void setShareAfterExport(final boolean shareAfterExport) {
+ editSharedSettings(new PrefRunnable() {
+ @Override
+ public void edit(Editor edit) {
+ edit.putBoolean(KEY_SHARE_AFTER_EXPORT, shareAfterExport);
+ }
+ });
+ }
+
public static int getTrackableAction() {
return sharedPrefs.getInt(KEY_LAST_TRACKABLE_ACTION, LogType.RETRIEVED_IT.id);
}
@@ -1158,6 +1167,10 @@ public final class Settings {
edit.putInt(KEY_LAST_TRACKABLE_ACTION, trackableAction);
}
});
+ }
+
+ public static boolean getShareAfterExport() {
+ return sharedPrefs.getBoolean(KEY_SHARE_AFTER_EXPORT, true);
}
public static String getPreferencesName() {