diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2015-01-15 14:37:35 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2015-01-15 14:37:35 +0100 |
commit | 3c473c490be8966da37589c512a629baa435aa49 (patch) | |
tree | 7bc6114e6acdead5a42aa1f2e715b6db9dffed69 /app/src/main/java/de | |
parent | 066cab8da5a3189b77d74732a16ebfe74299725d (diff) | |
download | AntennaPod-3c473c490be8966da37589c512a629baa435aa49.zip |
Made auto-cleanup and auto-download methods changeable
Diffstat (limited to 'app/src/main/java/de')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java | 1 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/config/DBTasksCallbacksImpl.java | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java b/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java index a19b5e3c9..10666aa36 100644 --- a/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java +++ b/app/src/main/java/de/danoeh/antennapod/config/ClientConfigurator.java @@ -16,5 +16,6 @@ public class ClientConfigurator { ClientConfig.playbackServiceCallbacks = new PlaybackServiceCallbacksImpl(); ClientConfig.storageCallbacks = new StorageCallbacksImpl(); ClientConfig.flattrCallbacks = new FlattrCallbacksImpl(); + ClientConfig.dbTasksCallbacks = new DBTasksCallbacksImpl(); } } diff --git a/app/src/main/java/de/danoeh/antennapod/config/DBTasksCallbacksImpl.java b/app/src/main/java/de/danoeh/antennapod/config/DBTasksCallbacksImpl.java new file mode 100644 index 000000000..75dcb2ef1 --- /dev/null +++ b/app/src/main/java/de/danoeh/antennapod/config/DBTasksCallbacksImpl.java @@ -0,0 +1,20 @@ +package de.danoeh.antennapod.config; + +import de.danoeh.antennapod.core.DBTasksCallbacks; +import de.danoeh.antennapod.core.storage.APCleanupAlgorithm; +import de.danoeh.antennapod.core.storage.APDownloadAlgorithm; +import de.danoeh.antennapod.core.storage.AutomaticDownloadAlgorithm; +import de.danoeh.antennapod.core.storage.EpisodeCleanupAlgorithm; + +public class DBTasksCallbacksImpl implements DBTasksCallbacks { + + @Override + public AutomaticDownloadAlgorithm getAutomaticDownloadAlgorithm() { + return new APDownloadAlgorithm(); + } + + @Override + public EpisodeCleanupAlgorithm getEpisodeCacheCleanupAlgorithm() { + return new APCleanupAlgorithm(); + } +} |