aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/Settings.java
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2011-10-06 23:33:21 +0200
committerSamuel Tardieu <sam@rfc1149.net>2011-10-06 23:33:21 +0200
commitcf8a6acc34f211fe1fb790a57befa86a835585dd (patch)
tree8ebcfc8c38cf67cd745db24de98e41b8ef2d1b4a /main/src/cgeo/geocaching/Settings.java
parentf8d30878a368895ce030099287c85836a446a66e (diff)
downloadcgeo-cf8a6acc34f211fe1fb790a57befa86a835585dd.zip
cgeo-cf8a6acc34f211fe1fb790a57befa86a835585dd.tar.gz
cgeo-cf8a6acc34f211fe1fb790a57befa86a835585dd.tar.bz2
Reorganize and cleanup the local storage handling
After the HTTP requests cleanup, it was time to rewrite the local storage handling. Code that manipulate files has been placed into a new LocalStorage class. It can locate files on the disk, retrieve web responses and store them, and copy files.
Diffstat (limited to 'main/src/cgeo/geocaching/Settings.java')
-rw-r--r--main/src/cgeo/geocaching/Settings.java20
1 files changed, 0 insertions, 20 deletions
diff --git a/main/src/cgeo/geocaching/Settings.java b/main/src/cgeo/geocaching/Settings.java
index c45df2b..94a31f4 100644
--- a/main/src/cgeo/geocaching/Settings.java
+++ b/main/src/cgeo/geocaching/Settings.java
@@ -14,7 +14,6 @@ import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.res.Configuration;
import android.content.res.Resources;
-import android.os.Environment;
import java.util.HashMap;
import java.util.Locale;
@@ -153,25 +152,6 @@ public final class Settings {
resources.updateConfiguration(config, resources.getDisplayMetrics());
}
- public static String getStorage() {
- return getStorageSpecific()[0];
- }
-
- public static String getStorageSec() {
- return getStorageSpecific()[1];
- }
-
- public static String[] getStorageSpecific() {
- final String external = Environment.getExternalStorageDirectory() + "/" + cache + "/";
- final String data = Environment.getDataDirectory() + "/data/cgeo.geocaching/" + cache + "/";
-
- if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
- return new String[] { external, data };
- } else {
- return new String[] { data, external };
- }
- }
-
public static boolean isLogin() {
final String preUsername = sharedPrefs.getString(KEY_USERNAME, null);
final String prePassword = sharedPrefs.getString(KEY_PASSWORD, null);