diff --git a/app/src/main/java/org/schabi/newpipe/player/MainPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainPlayer.java index fe1c95b9c..f62cf27b4 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainPlayer.java @@ -135,6 +135,11 @@ public final class MainPlayer extends Service { Log.d(TAG, "onStartCommand() called with: intent = [" + intent + "], flags = [" + flags + "], startId = [" + startId + "]"); } + if (Intent.ACTION_MEDIA_BUTTON.equals(intent.getAction()) + && playerImpl.playQueue == null) { + // Player is not working, no need to process media button's action + return START_NOT_STICKY; + } if (Intent.ACTION_MEDIA_BUTTON.equals(intent.getAction()) || intent.getStringExtra(VideoPlayer.PLAY_QUEUE_KEY) != null) {