diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2023-02-26 16:38:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-26 16:38:31 +0100 |
commit | ccea00e4056b85d5be0ebfa898a1ac961c2e3c56 (patch) | |
tree | fa7d9bad089b25843bd55d2358962fd09f1cbe04 /playback | |
parent | 3e077e5653d1c1be266d2bb5add85902c93e616e (diff) | |
download | AntennaPod-ccea00e4056b85d5be0ebfa898a1ac961c2e3c56.zip |
Remove deprecated media players (#6354)
Diffstat (limited to 'playback')
-rw-r--r-- | playback/base/src/main/java/de/danoeh/antennapod/playback/base/PlaybackServiceMediaPlayer.java | 14 | ||||
-rw-r--r-- | playback/cast/src/play/java/de/danoeh/antennapod/playback/cast/CastPsmp.java | 18 |
2 files changed, 4 insertions, 28 deletions
diff --git a/playback/base/src/main/java/de/danoeh/antennapod/playback/base/PlaybackServiceMediaPlayer.java b/playback/base/src/main/java/de/danoeh/antennapod/playback/base/PlaybackServiceMediaPlayer.java index a5b6df41e..ef15cef1d 100644 --- a/playback/base/src/main/java/de/danoeh/antennapod/playback/base/PlaybackServiceMediaPlayer.java +++ b/playback/base/src/main/java/de/danoeh/antennapod/playback/base/PlaybackServiceMediaPlayer.java @@ -9,7 +9,6 @@ import android.util.Pair; import android.view.SurfaceHolder; import java.util.List; -import java.util.concurrent.Future; import androidx.annotation.Nullable; import de.danoeh.antennapod.model.playback.MediaType; @@ -158,13 +157,6 @@ public abstract class PlaybackServiceMediaPlayer { */ public abstract void setVolume(float volumeLeft, float volumeRight); - /** - * Returns true if the mediaplayer can mix stereo down to mono - */ - public abstract boolean canDownmix(); - - public abstract void setDownmix(boolean enable); - public abstract MediaType getCurrentMediaType(); public abstract boolean isStreaming(); @@ -232,8 +224,8 @@ public abstract class PlaybackServiceMediaPlayer { * * @see #endPlayback(boolean, boolean, boolean, boolean) */ - public Future<?> stopPlayback(boolean toStoppedState) { - return endPlayback(false, false, false, toStoppedState); + public void stopPlayback(boolean toStoppedState) { + endPlayback(false, false, false, toStoppedState); } /** @@ -262,7 +254,7 @@ public abstract class PlaybackServiceMediaPlayer { * * @return a Future, just for the purpose of tracking its execution. */ - protected abstract Future<?> endPlayback(boolean hasEnded, boolean wasSkipped, + protected abstract void endPlayback(boolean hasEnded, boolean wasSkipped, boolean shouldContinue, boolean toStoppedState); /** diff --git a/playback/cast/src/play/java/de/danoeh/antennapod/playback/cast/CastPsmp.java b/playback/cast/src/play/java/de/danoeh/antennapod/playback/cast/CastPsmp.java index 0858d4fc9..7562f9806 100644 --- a/playback/cast/src/play/java/de/danoeh/antennapod/playback/cast/CastPsmp.java +++ b/playback/cast/src/play/java/de/danoeh/antennapod/playback/cast/CastPsmp.java @@ -8,8 +8,6 @@ import android.view.SurfaceHolder; import java.util.Collections; import java.util.List; -import java.util.concurrent.Future; -import java.util.concurrent.FutureTask; import java.util.concurrent.atomic.AtomicBoolean; import androidx.annotation.Nullable; @@ -431,16 +429,6 @@ public class CastPsmp extends PlaybackServiceMediaPlayer { } @Override - public boolean canDownmix() { - return false; - } - - @Override - public void setDownmix(boolean enable) { - throw new UnsupportedOperationException("Setting downmix unsupported in Remote Media Player"); - } - - @Override public MediaType getCurrentMediaType() { return mediaType; } @@ -497,7 +485,7 @@ public class CastPsmp extends PlaybackServiceMediaPlayer { } @Override - protected Future<?> endPlayback(boolean hasEnded, boolean wasSkipped, boolean shouldContinue, + protected void endPlayback(boolean hasEnded, boolean wasSkipped, boolean shouldContinue, boolean toStoppedState) { Log.d(TAG, "endPlayback() called"); boolean isPlaying = playerStatus == PlayerStatus.PLAYING; @@ -544,10 +532,6 @@ public class CastPsmp extends PlaybackServiceMediaPlayer { callback.onPlaybackPause(currentMedia, currentMedia != null ? currentMedia.getPosition() : Playable.INVALID_TIME); } - - FutureTask<?> future = new FutureTask<>(() -> { }, null); - future.run(); - return future; } @Override |