summaryrefslogtreecommitdiff
path: root/storage/preferences
diff options
context:
space:
mode:
Diffstat (limited to 'storage/preferences')
-rw-r--r--storage/preferences/build.gradle2
-rw-r--r--storage/preferences/src/main/AndroidManifest.xml1
-rw-r--r--storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java39
3 files changed, 7 insertions, 35 deletions
diff --git a/storage/preferences/build.gradle b/storage/preferences/build.gradle
index 0da810e28..51a5e90fd 100644
--- a/storage/preferences/build.gradle
+++ b/storage/preferences/build.gradle
@@ -4,6 +4,8 @@ plugins {
apply from: "../../common.gradle"
android {
+ namespace "de.danoeh.antennapod.storage.preferences"
+
lint {
disable "StaticFieldLeak"
}
diff --git a/storage/preferences/src/main/AndroidManifest.xml b/storage/preferences/src/main/AndroidManifest.xml
deleted file mode 100644
index b3a9b9def..000000000
--- a/storage/preferences/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1 +0,0 @@
-<manifest package="de.danoeh.antennapod.storage.preferences" />
diff --git a/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java b/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java
index f2b122fcc..80a58525d 100644
--- a/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java
+++ b/storage/preferences/src/main/java/de/danoeh/antennapod/storage/preferences/UserPreferences.java
@@ -56,7 +56,6 @@ public class UserPreferences {
private static final String PREF_PERSISTENT_NOTIFICATION = "prefPersistNotify";
public static final String PREF_COMPACT_NOTIFICATION_BUTTONS = "prefCompactNotificationButtons";
private static final String PREF_SHOW_DOWNLOAD_REPORT = "prefShowDownloadReport";
- private static final String PREF_SHOW_AUTO_DOWNLOAD_REPORT = "prefShowAutoDownloadReport";
public static final String PREF_DEFAULT_PAGE = "prefDefaultPage";
public static final String PREF_FILTER_FEED = "prefSubscriptionsFilter";
public static final String PREF_SUBSCRIPTION_TITLE = "prefSubscriptionTitle";
@@ -78,6 +77,7 @@ public class UserPreferences {
public static final String PREF_SKIP_KEEPS_EPISODE = "prefSkipKeepsEpisode";
private static final String PREF_FAVORITE_KEEPS_EPISODE = "prefFavoriteKeepsEpisode";
private static final String PREF_AUTO_DELETE = "prefAutoDelete";
+ private static final String PREF_AUTO_DELETE_LOCAL = "prefAutoDeleteLocal";
public static final String PREF_SMART_MARK_AS_PLAYED_SECS = "prefSmartMarkAsPlayedSecs";
private static final String PREF_PLAYBACK_SPEED_ARRAY = "prefPlaybackSpeedArray";
public static final String PREF_PAUSE_PLAYBACK_FOR_FOCUS_LOSS = "prefPauseForFocusLoss";
@@ -290,49 +290,16 @@ public class UserPreferences {
}
/**
- * Returns true if download reports are shown
- *
- * @return {@code true} if download reports are shown, {@code false} otherwise
- */
- public static boolean showDownloadReport() {
- if (Build.VERSION.SDK_INT >= 26) {
- return true; // System handles notification preferences
- }
- return prefs.getBoolean(PREF_SHOW_DOWNLOAD_REPORT, true);
- }
-
- /**
* Used for migration of the preference to system notification channels.
*/
public static boolean getShowDownloadReportRaw() {
return prefs.getBoolean(PREF_SHOW_DOWNLOAD_REPORT, true);
}
- public static boolean showAutoDownloadReport() {
- if (Build.VERSION.SDK_INT >= 26) {
- return true; // System handles notification preferences
- }
- return prefs.getBoolean(PREF_SHOW_AUTO_DOWNLOAD_REPORT, false);
- }
-
- /**
- * Used for migration of the preference to system notification channels.
- */
- public static boolean getShowAutoDownloadReportRaw() {
- return prefs.getBoolean(PREF_SHOW_AUTO_DOWNLOAD_REPORT, false);
- }
-
public static boolean enqueueDownloadedEpisodes() {
return prefs.getBoolean(PREF_ENQUEUE_DOWNLOADED, true);
}
- @VisibleForTesting
- public static void setEnqueueDownloadedEpisodes(boolean enqueueDownloadedEpisodes) {
- prefs.edit()
- .putBoolean(PREF_ENQUEUE_DOWNLOADED, enqueueDownloadedEpisodes)
- .apply();
- }
-
public enum EnqueueLocation {
BACK, FRONT, AFTER_CURRENTLY_PLAYING, RANDOM
}
@@ -400,6 +367,10 @@ public class UserPreferences {
return prefs.getBoolean(PREF_AUTO_DELETE, false);
}
+ public static boolean isAutoDeleteLocal() {
+ return prefs.getBoolean(PREF_AUTO_DELETE_LOCAL, false);
+ }
+
public static int getSmartMarkAsPlayedSecs() {
return Integer.parseInt(prefs.getString(PREF_SMART_MARK_AS_PLAYED_SECS, "30"));
}