diff options
author | ByteHamster <info@bytehamster.com> | 2022-11-02 23:18:28 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-11-03 22:49:33 +0100 |
commit | cd9845ed4c8867c16f30bbcc059573609971b667 (patch) | |
tree | dbc48d5bc1aad2e052711549906944731fba4cee /app | |
parent | 6c1ec57bc13c859b478affbc9d4e44217cd7d92c (diff) | |
download | AntennaPod-cd9845ed4c8867c16f30bbcc059573609971b667.zip |
Make NetworkUtils less fat
Breaks dependency cycles
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/receiver/ConnectivityActionReceiver.java | 4 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/receiver/ConnectivityActionReceiver.java b/app/src/main/java/de/danoeh/antennapod/receiver/ConnectivityActionReceiver.java index e3ead5a8c..3d7344b9b 100644 --- a/app/src/main/java/de/danoeh/antennapod/receiver/ConnectivityActionReceiver.java +++ b/app/src/main/java/de/danoeh/antennapod/receiver/ConnectivityActionReceiver.java @@ -8,7 +8,7 @@ import android.text.TextUtils; import android.util.Log; import de.danoeh.antennapod.core.ClientConfigurator; -import de.danoeh.antennapod.core.util.NetworkUtils; +import de.danoeh.antennapod.core.util.download.NetworkConnectionChangeHandler; public class ConnectivityActionReceiver extends BroadcastReceiver { private static final String TAG = "ConnectivityActionRecvr"; @@ -19,7 +19,7 @@ public class ConnectivityActionReceiver extends BroadcastReceiver { Log.d(TAG, "Received intent"); ClientConfigurator.initialize(context); - NetworkUtils.networkChangedDetected(); + NetworkConnectionChangeHandler.networkChangedDetected(); } } } diff --git a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java index 22b46492f..8e5f48324 100644 --- a/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java +++ b/app/src/main/java/de/danoeh/antennapod/view/viewholder/EpisodeItemViewHolder.java @@ -23,6 +23,7 @@ import de.danoeh.antennapod.adapter.CoverLoader; import de.danoeh.antennapod.adapter.actionbutton.ItemActionButton; import de.danoeh.antennapod.core.service.download.DownloadRequest; import de.danoeh.antennapod.core.service.download.DownloadService; +import de.danoeh.antennapod.core.util.download.MediaSizeLoader; import de.danoeh.antennapod.event.playback.PlaybackPositionEvent; import de.danoeh.antennapod.core.util.DateFormatter; import de.danoeh.antennapod.model.feed.FeedItem; @@ -182,7 +183,7 @@ public class EpisodeItemViewHolder extends RecyclerView.ViewHolder { } else if (NetworkUtils.isEpisodeHeadDownloadAllowed() && !media.checkedOnSizeButUnknown()) { size.setText("{fa-spinner}"); Iconify.addIcons(size); - NetworkUtils.getFeedMediaSizeObservable(media).subscribe( + MediaSizeLoader.getFeedMediaSizeObservable(media).subscribe( sizeValue -> { if (sizeValue > 0) { size.setText(Formatter.formatShortFileSize(activity, sizeValue)); |