diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2022-01-04 18:56:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-04 18:56:24 +0100 |
commit | 1ddc79d924e583ebb2051fd616b249615ac09ae1 (patch) | |
tree | 6ca2d05db11d5e394a47eb72a2e54a26ad1781f2 | |
parent | e8f97c28b030382b1883013c2811732dfc2dfe05 (diff) | |
parent | a445049b66d518f96b70617fac314666c1e3c1ed (diff) | |
download | AntennaPod-1ddc79d924e583ebb2051fd616b249615ac09ae1.zip |
Merge pull request #5639 from ByteHamster/fix-crash-share-dialog
Fix crash when share dialog tries to serialize FeedMedia
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackServiceStarter.java | 3 | ||||
-rw-r--r-- | model/src/main/java/de/danoeh/antennapod/model/playback/Playable.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackServiceStarter.java b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackServiceStarter.java index 061a976dc..3efded9ed 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackServiceStarter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/playback/PlaybackServiceStarter.java @@ -2,6 +2,7 @@ package de.danoeh.antennapod.core.util.playback; import android.content.Context; import android.content.Intent; +import android.os.Parcelable; import androidx.core.content.ContextCompat; import de.danoeh.antennapod.core.preferences.PlaybackPreferences; @@ -66,7 +67,7 @@ public class PlaybackServiceStarter { public Intent getIntent() { Intent launchIntent = new Intent(context, PlaybackService.class); - launchIntent.putExtra(PlaybackService.EXTRA_PLAYABLE, media); + launchIntent.putExtra(PlaybackService.EXTRA_PLAYABLE, (Parcelable) media); launchIntent.putExtra(PlaybackService.EXTRA_START_WHEN_PREPARED, startWhenPrepared); launchIntent.putExtra(PlaybackService.EXTRA_SHOULD_STREAM, shouldStream); launchIntent.putExtra(PlaybackService.EXTRA_PREPARE_IMMEDIATELY, prepareImmediately); diff --git a/model/src/main/java/de/danoeh/antennapod/model/playback/Playable.java b/model/src/main/java/de/danoeh/antennapod/model/playback/Playable.java index 151be92e6..7120f76ea 100644 --- a/model/src/main/java/de/danoeh/antennapod/model/playback/Playable.java +++ b/model/src/main/java/de/danoeh/antennapod/model/playback/Playable.java @@ -7,13 +7,14 @@ import android.os.Parcelable; import androidx.annotation.Nullable; import de.danoeh.antennapod.model.feed.Chapter; +import java.io.Serializable; import java.util.Date; import java.util.List; /** * Interface for objects that can be played by the PlaybackService. */ -public interface Playable extends Parcelable { +public interface Playable extends Parcelable, Serializable { int INVALID_TIME = -1; /** |