diff options
author | Tom Hennen <TomHennen@users.noreply.github.com> | 2015-11-27 10:42:10 -0500 |
---|---|---|
committer | Tom Hennen <TomHennen@users.noreply.github.com> | 2015-11-27 10:42:10 -0500 |
commit | a7293b4a66c374f9ed421cb29f288f1754612871 (patch) | |
tree | 70de3904660431b1fa6d47af548fcc3c6a231ddf /core | |
parent | f169a26488f29c51f30b763233d7bb8c8ca8eae6 (diff) | |
parent | 40a708fd0ef71342ccc7cd24553f5cfe57b126d4 (diff) | |
download | AntennaPod-a7293b4a66c374f9ed421cb29f288f1754612871.zip |
Merge pull request #1422 from mfietz/crash_report_mail
Log Crash Report
Diffstat (limited to 'core')
4 files changed, 9 insertions, 6 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java index 6de546d3b..428d1d7d3 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java +++ b/core/src/main/java/de/danoeh/antennapod/core/preferences/UserPreferences.java @@ -520,7 +520,7 @@ public class UserPreferences { * @return The data folder that has been requested or null if the folder * could not be created. */ - public static File getDataFolder(Context context, String type) { + public static File getDataFolder(String type) { String strDir = prefs.getString(PREF_DATA_FOLDER, null); if (strDir == null) { Log.d(TAG, "Using default data folder"); @@ -542,7 +542,7 @@ public class UserPreferences { for (int i = 0; i < dirs.length; i++) { if (dirs.length > 0) { if (i < dirs.length - 1) { - dataDir = getDataFolder(context, dirs[i]); + dataDir = getDataFolder(dirs[i]); if (dataDir == null) { return null; } @@ -593,7 +593,7 @@ public class UserPreferences { * available */ private static void createImportDirectory() { - File importDir = getDataFolder(context, IMPORT_DIR); + File importDir = getDataFolder(IMPORT_DIR); if (importDir != null) { if (importDir.exists()) { Log.d(TAG, "Import directory already exists"); diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java index 318060abc..ee079c068 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java @@ -334,7 +334,7 @@ public class DownloadRequester { private File getExternalFilesDirOrThrowException(Context context, String type) throws DownloadRequestException { - File result = UserPreferences.getDataFolder(context, type); + File result = UserPreferences.getDataFolder(type); if (result == null) { throw new DownloadRequestException( "Failed to access external storage"); diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java index dea380937..248f2bf32 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/StorageUtils.java @@ -19,7 +19,7 @@ public class StorageUtils { private static final String TAG = "StorageUtils"; public static boolean storageAvailable(Context context) { - File dir = UserPreferences.getDataFolder(context, null); + File dir = UserPreferences.getDataFolder(null); if (dir != null) { return dir.exists() && dir.canRead() && dir.canWrite(); } else { @@ -52,7 +52,7 @@ public class StorageUtils { */ public static long getFreeSpaceAvailable() { StatFs stat = new StatFs(UserPreferences.getDataFolder( - ClientConfig.applicationCallbacks.getApplicationInstance(), null).getAbsolutePath()); + null).getAbsolutePath()); long availableBlocks; long blockSize; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) { diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 151c0b915..575724427 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -364,6 +364,9 @@ <string name="pref_smart_mark_as_played_disabled">Disabled</string> <string name="pref_image_cache_size_title">Image Cache Size</string> <string name="pref_image_cache_size_sum">Size of the disk cache for images.</string> + <string name="crash_report_title">Crash Report</string> + <string name="crash_report_sum">Send the latest crash report via e-mail</string> + <string name="send_email">Send e-mail</string> <string name="experimental_pref">Experimental</string> <string name="pref_sonic_title">Sonic media player</string> <string name="pref_sonic_message">Use built-in sonic media player as a replacement for Prestissimo</string> |