diff options
author | ByteHamster <info@bytehamster.com> | 2021-02-15 21:56:03 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2021-02-15 21:56:06 +0100 |
commit | 339aa936bf53e96236dba12b0d356f196e04813c (patch) | |
tree | 03d3b7b1f05c4bb96ede7e4d45a6224a75bc2d81 /core/src/main | |
parent | c0d3a6e3be545e4719ce23b15f9612b66fd8040b (diff) | |
download | AntennaPod-339aa936bf53e96236dba12b0d356f196e04813c.zip |
Removed return parameter of loadMediaInfo
We return true anyways. The call for actually loading is asynchronous,
so returning anything here does not make sense.
Reduces likelihood of loader being interrupted to just load the same
item again when the state changes.
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java index ae8d1a45e..037561a57 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackController.java @@ -51,7 +51,7 @@ import java.util.List; * Communicates with the playback service. GUI classes should use this class to * control playback instead of communicating with the PlaybackService directly. */ -public class PlaybackController { +public abstract class PlaybackController { private static final String TAG = "PlaybackController"; private static final int INVALID_TIME = -1; @@ -431,7 +431,10 @@ public class PlaybackController { } private void checkMediaInfoLoaded() { - mediaInfoLoaded = (mediaInfoLoaded || loadMediaInfo()); + if (!mediaInfoLoaded) { + loadMediaInfo(); + } + mediaInfoLoaded = true; } private void updatePlayButtonAppearance(int resource, CharSequence contentDescription) { @@ -446,9 +449,7 @@ public class PlaybackController { return null; } - public boolean loadMediaInfo() { - return false; - } + public abstract void loadMediaInfo(); public void onAwaitingVideoSurface() {} |