diff --git a/app/src/androidTest/java/de/danoeh/antennapod/core/service/download/StubDownloader.java b/app/src/androidTest/java/de/danoeh/antennapod/core/service/download/StubDownloader.java index e7fe079a6..7aac738e7 100644 --- a/app/src/androidTest/java/de/danoeh/antennapod/core/service/download/StubDownloader.java +++ b/app/src/androidTest/java/de/danoeh/antennapod/core/service/download/StubDownloader.java @@ -1,8 +1,7 @@ package de.danoeh.antennapod.core.service.download; import androidx.annotation.NonNull; - -import de.danoeh.antennapod.core.util.Consumer; +import androidx.core.util.Consumer; public class StubDownloader extends Downloader { diff --git a/app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java b/app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java index 229d4b307..b7f062223 100644 --- a/app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java +++ b/app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java @@ -4,6 +4,7 @@ import android.content.Context; import android.content.Intent; import androidx.annotation.NonNull; import androidx.annotation.Nullable; +import androidx.core.util.Consumer; import androidx.test.InstrumentationRegistry; import androidx.test.runner.AndroidJUnit4; @@ -35,7 +36,6 @@ import de.danoeh.antennapod.core.service.download.StubDownloader; import de.danoeh.antennapod.core.storage.DBReader; import de.danoeh.antennapod.core.storage.DBWriter; import de.danoeh.antennapod.core.storage.DownloadRequester; -import de.danoeh.antennapod.core.util.Consumer; import static de.test.antennapod.util.event.DownloadEventListener.withDownloadEventListener; import static de.test.antennapod.util.event.FeedItemEventListener.withFeedItemEventListener; diff --git a/app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java b/app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java index 10ca281cb..1fb156760 100644 --- a/app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java +++ b/app/src/androidTest/java/de/test/antennapod/storage/DBWriterTest.java @@ -6,6 +6,7 @@ import android.database.Cursor; import android.preference.PreferenceManager; import android.util.Log; +import androidx.core.util.Consumer; import androidx.test.InstrumentationRegistry; import androidx.test.filters.MediumTest; @@ -31,7 +32,6 @@ import de.danoeh.antennapod.core.preferences.UserPreferences; import de.danoeh.antennapod.core.storage.DBReader; import de.danoeh.antennapod.core.storage.DBWriter; import de.danoeh.antennapod.core.storage.PodDBAdapter; -import de.danoeh.antennapod.core.util.Consumer; import de.danoeh.antennapod.core.util.FeedItemUtil; import static androidx.test.InstrumentationRegistry.getInstrumentation; diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java index c0ba75ba6..698d7e295 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -22,9 +22,12 @@ import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; +import androidx.arch.core.util.Function; import androidx.core.app.ActivityCompat; import androidx.core.app.ActivityOptionsCompat; import androidx.core.content.ContextCompat; +import androidx.core.util.Consumer; +import androidx.core.util.Supplier; import com.bumptech.glide.Glide; import de.danoeh.antennapod.R; import de.danoeh.antennapod.core.event.PlaybackPositionEvent; @@ -35,15 +38,12 @@ import de.danoeh.antennapod.core.preferences.UserPreferences; import de.danoeh.antennapod.core.service.playback.PlaybackService; import de.danoeh.antennapod.core.storage.DBReader; import de.danoeh.antennapod.core.storage.DBWriter; -import de.danoeh.antennapod.core.util.Consumer; import de.danoeh.antennapod.core.util.Converter; import de.danoeh.antennapod.core.util.FeedItemUtil; import de.danoeh.antennapod.core.util.Flavors; -import de.danoeh.antennapod.core.util.Function; import de.danoeh.antennapod.core.util.IntentUtils; import de.danoeh.antennapod.core.util.ShareUtils; import de.danoeh.antennapod.core.util.StorageUtils; -import de.danoeh.antennapod.core.util.Supplier; import de.danoeh.antennapod.core.util.TimeSpeedConverter; import de.danoeh.antennapod.core.util.gui.PictureInPictureUtil; import de.danoeh.antennapod.core.util.playback.ExternalMedia; diff --git a/app/src/main/java/de/danoeh/antennapod/view/ShownotesWebView.java b/app/src/main/java/de/danoeh/antennapod/view/ShownotesWebView.java index 3ea57eb5e..88efc1f84 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/ShownotesWebView.java +++ b/app/src/main/java/de/danoeh/antennapod/view/ShownotesWebView.java @@ -15,11 +15,9 @@ import android.view.View; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; -import androidx.core.content.ContextCompat; +import androidx.core.util.Consumer; import com.google.android.material.snackbar.Snackbar; import de.danoeh.antennapod.R; -import de.danoeh.antennapod.core.preferences.UserPreferences; -import de.danoeh.antennapod.core.util.Consumer; import de.danoeh.antennapod.core.util.Converter; import de.danoeh.antennapod.core.util.IntentUtils; import de.danoeh.antennapod.core.util.NetworkUtils; diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/Consumer.java b/core/src/main/java/de/danoeh/antennapod/core/util/Consumer.java deleted file mode 100644 index 13a87af0d..000000000 --- a/core/src/main/java/de/danoeh/antennapod/core/util/Consumer.java +++ /dev/null @@ -1,5 +0,0 @@ -package de.danoeh.antennapod.core.util; - -public interface Consumer { - void accept(T t); -} diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/Function.java b/core/src/main/java/de/danoeh/antennapod/core/util/Function.java deleted file mode 100644 index c4f4ad68a..000000000 --- a/core/src/main/java/de/danoeh/antennapod/core/util/Function.java +++ /dev/null @@ -1,7 +0,0 @@ -package de.danoeh.antennapod.core.util; - -import io.reactivex.annotations.NonNull; - -public interface Function { - R apply(@NonNull T t); -} diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/Supplier.java b/core/src/main/java/de/danoeh/antennapod/core/util/Supplier.java deleted file mode 100644 index 796b03154..000000000 --- a/core/src/main/java/de/danoeh/antennapod/core/util/Supplier.java +++ /dev/null @@ -1,5 +0,0 @@ -package de.danoeh.antennapod.core.util; - -public interface Supplier { - T get(); -}