diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2015-11-27 15:05:49 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2015-11-27 15:05:49 +0100 |
commit | 40a708fd0ef71342ccc7cd24553f5cfe57b126d4 (patch) | |
tree | 10a2c45d1902335de0a9aa0d04c039473857345f /core/src | |
parent | 67ef3febea9cf1748dc206d8298e5f10f321f91c (diff) | |
download | AntennaPod-40a708fd0ef71342ccc7cd24553f5cfe57b126d4.zip |
Log crash reports, users can send them via email
Diffstat (limited to 'core/src')
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 b13f7a0cb..6c0ec06fd 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 @@ -335,7 +335,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 6cbc5579d..d9c165694 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> |