From 4a6731d4e1634f939227caacc05ce013b0b44ffb Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Thu, 21 Nov 2019 10:28:33 +0100 Subject: [PATCH] Explicitly set default download/streaming value for existing users This mankes it easier to change the default later without affecting existing installs --- .../de/danoeh/antennapod/preferences/PreferenceUpgrader.java | 1 + .../de/danoeh/antennapod/core/preferences/UserPreferences.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java index 455038960..d0321ddd2 100644 --- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java +++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceUpgrader.java @@ -76,6 +76,7 @@ public class PreferenceUpgrader { } UserPreferences.setQueueLocked(false); + prefs.edit().putBoolean(UserPreferences.PREF_STREAM_OVER_DOWNLOAD, false).apply(); if (!prefs.contains(UserPreferences.PREF_ENQUEUE_LOCATION)) { final String keyOldPrefEnqueueFront = "prefQueueAddToFront"; 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 750f79711..708bea7d6 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 @@ -82,7 +82,7 @@ public class UserPreferences { private static final String PREF_RESUME_AFTER_CALL = "prefResumeAfterCall"; public static final String PREF_VIDEO_BEHAVIOR = "prefVideoBehavior"; private static final String PREF_TIME_RESPECTS_SPEED = "prefPlaybackTimeRespectsSpeed"; - private static final String PREF_STREAM_OVER_DOWNLOAD = "prefStreamOverDownload"; + public static final String PREF_STREAM_OVER_DOWNLOAD = "prefStreamOverDownload"; // Network private static final String PREF_ENQUEUE_DOWNLOADED = "prefEnqueueDownloaded";