summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
Diffstat (limited to 'storage')
-rw-r--r--storage/database/build.gradle2
-rw-r--r--storage/database/src/main/AndroidManifest.xml1
-rw-r--r--storage/database/src/main/java/de/danoeh/antennapod/storage/database/mapper/FeedItemSortQuery.java6
-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
6 files changed, 15 insertions, 36 deletions
diff --git a/storage/database/build.gradle b/storage/database/build.gradle
index 0dc5cef63..283827ad3 100644
--- a/storage/database/build.gradle
+++ b/storage/database/build.gradle
@@ -4,6 +4,8 @@ plugins {
apply from: "../../common.gradle"
android {
+ namespace "de.danoeh.antennapod.storage.database"
+
lint {
disable "StaticFieldLeak", "StringFormatCount", "StringFormatMatches", "StringFormatInvalid", "PluralsCandidate", "StringFormatTrivial"
}
diff --git a/storage/database/src/main/AndroidManifest.xml b/storage/database/src/main/AndroidManifest.xml
deleted file mode 100644
index df0171d12..000000000
--- a/storage/database/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1 +0,0 @@
-<manifest package="de.danoeh.antennapod.storage.database" />
diff --git a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/mapper/FeedItemSortQuery.java b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/mapper/FeedItemSortQuery.java
index aae5154d3..d4404a082 100644
--- a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/mapper/FeedItemSortQuery.java
+++ b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/mapper/FeedItemSortQuery.java
@@ -25,6 +25,12 @@ public class FeedItemSortQuery {
case DURATION_LONG_SHORT:
sortQuery = PodDBAdapter.TABLE_NAME_FEED_MEDIA + "." + PodDBAdapter.KEY_DURATION + " " + "DESC";
break;
+ case SIZE_SMALL_LARGE:
+ sortQuery = PodDBAdapter.TABLE_NAME_FEED_MEDIA + "." + PodDBAdapter.KEY_SIZE + " " + "ASC";
+ break;
+ case SIZE_LARGE_SMALL:
+ sortQuery = PodDBAdapter.TABLE_NAME_FEED_MEDIA + "." + PodDBAdapter.KEY_SIZE + " " + "DESC";
+ break;
default:
sortQuery = "";
break;
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"));
}