aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/utils
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2013-01-23 09:25:03 +0100
committerSamuel Tardieu <sam@rfc1149.net>2013-01-23 09:25:03 +0100
commitc4d3b139bc71dc4cd713a85139ea4364c733d711 (patch)
treeb990d22490f0e404e2ae422a27ec9447aa69b8d0 /main/src/cgeo/geocaching/utils
parentf5ecc5ec78d7613e7508540bea7bae73e8e1e35f (diff)
parent07e614c71e22d5bc7a6fc3e31557b4d20a21daea (diff)
downloadcgeo-c4d3b139bc71dc4cd713a85139ea4364c733d711.zip
cgeo-c4d3b139bc71dc4cd713a85139ea4364c733d711.tar.gz
cgeo-c4d3b139bc71dc4cd713a85139ea4364c733d711.tar.bz2
Merge branch 'release' into upstream
Diffstat (limited to 'main/src/cgeo/geocaching/utils')
-rw-r--r--main/src/cgeo/geocaching/utils/ApplicationSettings.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/utils/ApplicationSettings.java b/main/src/cgeo/geocaching/utils/ApplicationSettings.java
new file mode 100644
index 0000000..99d3142
--- /dev/null
+++ b/main/src/cgeo/geocaching/utils/ApplicationSettings.java
@@ -0,0 +1,24 @@
+package cgeo.geocaching.utils;
+
+/**
+ * This utility class contains static settings that do not require a context or
+ * an application. It may not depend or use any other package from c:geo.
+ * <br/>
+ * It is used, for example, to get some settings for the BackupAgent. In this case,
+ * no application is instantiated by the OS.
+ */
+
+public class ApplicationSettings {
+
+ /**
+ * Get the name of the preferences file.
+ *
+ * @return the name of the shared preferences file without the extension
+ */
+ public static String getPreferencesName() {
+ // There is currently no Android API to get the file name of the shared preferences. Let's hardcode
+ // it without needing a cgeoapplication instance.
+ return "cgeo.geocaching_preferences";
+ }
+
+}