summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/danoeh/antennapod/adapter
diff options
context:
space:
mode:
authorH. Lehmann <ByteHamster@users.noreply.github.com>2018-06-26 17:31:42 +0200
committerGitHub <noreply@github.com>2018-06-26 17:31:42 +0200
commitc9c2e68d7b6c17101241c15c4144325794a55a23 (patch)
tree33047e0483542e022c37f61a021a2f52246dd01f /app/src/main/java/de/danoeh/antennapod/adapter
parenta0543ff09877a5c80344d431744ab2922ccaa1e9 (diff)
parentdcb215ad70d9872648c741afa6fdf5f7e889cfb3 (diff)
downloadAntennaPod-c9c2e68d7b6c17101241c15c4144325794a55a23.zip
Merge pull request #2718 from ByteHamster/broadcasts
Limit broadcasts to current app
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/DefaultActionButtonCallback.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DefaultActionButtonCallback.java b/app/src/main/java/de/danoeh/antennapod/adapter/DefaultActionButtonCallback.java
index d8f324e8a..08b2908ac 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/DefaultActionButtonCallback.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/DefaultActionButtonCallback.java
@@ -6,6 +6,7 @@ import android.widget.Toast;
import com.afollestad.materialdialogs.MaterialDialog;
+import de.danoeh.antennapod.core.util.IntentUtils;
import de.danoeh.antennapod.core.util.playback.PlaybackServiceStarter;
import org.apache.commons.lang3.Validate;
@@ -86,13 +87,13 @@ public class DefaultActionButtonCallback implements ActionButtonCallback {
.startWhenPrepared(true)
.shouldStream(false)
.start();
- context.sendBroadcast(new Intent(PlaybackService.ACTION_PAUSE_PLAY_CURRENT_EPISODE));
+ IntentUtils.sendLocalBroadcast(context, PlaybackService.ACTION_PAUSE_PLAY_CURRENT_EPISODE);
} else if (media.isCurrentlyPaused()) {
new PlaybackServiceStarter(context, media)
.startWhenPrepared(true)
.shouldStream(false)
.start();
- context.sendBroadcast(new Intent(PlaybackService.ACTION_RESUME_PLAY_CURRENT_EPISODE));
+ IntentUtils.sendLocalBroadcast(context, PlaybackService.ACTION_RESUME_PLAY_CURRENT_EPISODE);
} else {
DBTasks.playMedia(context, media, false, true, false);
}