move to user preferences

This commit is contained in:
Ross Harrison 2015-02-08 19:21:42 -06:00
parent 7c76d2c57b
commit 46252ce663
3 changed files with 3 additions and 4 deletions

View File

@ -43,9 +43,6 @@ public class PlaybackPreferences implements
/** True if last played media was a video. */ /** True if last played media was a video. */
public static final String PREF_CURRENT_EPISODE_IS_VIDEO = "de.danoeh.antennapod.preferences.lastIsVideo"; public static final String PREF_CURRENT_EPISODE_IS_VIDEO = "de.danoeh.antennapod.preferences.lastIsVideo";
/** Value of PREF_QUEUE_ADD_TO_FRONT if no media is playing. */
public static final String PREF_QUEUE_ADD_TO_FRONT = "prefQueueAddToFront";
/** Value of PREF_CURRENTLY_PLAYING_MEDIA if no media is playing. */ /** Value of PREF_CURRENTLY_PLAYING_MEDIA if no media is playing. */
public static final long NO_MEDIA_PLAYING = -1; public static final long NO_MEDIA_PLAYING = -1;

View File

@ -60,6 +60,7 @@ public class UserPreferences implements
private static final String PREF_SEEK_DELTA_SECS = "prefSeekDeltaSecs"; private static final String PREF_SEEK_DELTA_SECS = "prefSeekDeltaSecs";
private static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify"; private static final String PREF_EXPANDED_NOTIFICATION = "prefExpandNotify";
private static final String PREF_PERSISTENT_NOTIFICATION = "prefPersistNotify"; private static final String PREF_PERSISTENT_NOTIFICATION = "prefPersistNotify";
public static final String PREF_QUEUE_ADD_TO_FRONT = "prefQueueAddToFront";
// TODO: Make this value configurable // TODO: Make this value configurable
private static final float PREF_AUTO_FLATTR_PLAYED_DURATION_THRESHOLD_DEFAULT = 0.8f; private static final float PREF_AUTO_FLATTR_PLAYED_DURATION_THRESHOLD_DEFAULT = 0.8f;

View File

@ -13,6 +13,7 @@ import de.danoeh.antennapod.core.asynctask.FlattrClickWorker;
import de.danoeh.antennapod.core.feed.*; import de.danoeh.antennapod.core.feed.*;
import de.danoeh.antennapod.core.preferences.GpodnetPreferences; import de.danoeh.antennapod.core.preferences.GpodnetPreferences;
import de.danoeh.antennapod.core.preferences.PlaybackPreferences; import de.danoeh.antennapod.core.preferences.PlaybackPreferences;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.service.download.DownloadStatus; import de.danoeh.antennapod.core.service.download.DownloadStatus;
import de.danoeh.antennapod.core.service.playback.PlaybackService; import de.danoeh.antennapod.core.service.playback.PlaybackService;
import de.danoeh.antennapod.core.util.QueueAccess; import de.danoeh.antennapod.core.util.QueueAccess;
@ -379,7 +380,7 @@ public class DBWriter {
if (item != null) { if (item != null) {
// add item to either front ot back of queue // add item to either front ot back of queue
boolean addToFront = PreferenceManager.getDefaultSharedPreferences(context) boolean addToFront = PreferenceManager.getDefaultSharedPreferences(context)
.getBoolean(PlaybackPreferences.PREF_QUEUE_ADD_TO_FRONT, false); .getBoolean(UserPreferences.PREF_QUEUE_ADD_TO_FRONT, false);
if(addToFront){ if(addToFront){
queue.add(0, item); queue.add(0, item);