From 49b16493488d87e79fc7296bcc5af1fee0bbdfb7 Mon Sep 17 00:00:00 2001
From: litetex <40789489+litetex@users.noreply.github.com>
Date: Mon, 3 Jan 2022 15:00:30 +0100
Subject: [PATCH] Revert "Merge pull request #7568 from
vhouriet/vhouriet_feature_already-playing-in-backgroud"
This reverts commit ee19ea66b3f4f182f78634c2d791dab6cab77257, reversing
changes made to 6b490ee547879033ec3e7d9ca3433f35babbfa7b.
---
.../org/schabi/newpipe/util/NavigationHelper.java | 12 ++++--------
app/src/main/res/values/strings.xml | 1 -
2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java
index 2a3f3c2dd..c01e051b0 100644
--- a/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java
+++ b/app/src/main/java/org/schabi/newpipe/util/NavigationHelper.java
@@ -168,14 +168,10 @@ public final class NavigationHelper {
public static void playOnBackgroundPlayer(final Context context,
final PlayQueue queue,
final boolean resumePlayback) {
- Toast.makeText(
- context,
- PlayerHolder.getInstance().getType() == PlayerType.AUDIO
- ? R.string.background_player_already_playing_toast
- : R.string.background_player_playing_toast,
- Toast.LENGTH_SHORT)
- .show();
-
+ if (PlayerHolder.getInstance().getType() != MainPlayer.PlayerType.AUDIO) {
+ Toast.makeText(context, R.string.background_player_playing_toast, Toast.LENGTH_SHORT)
+ .show();
+ }
final Intent intent = getPlayerIntent(context, MainPlayer.class, queue, resumePlayback);
intent.putExtra(Player.PLAYER_TYPE, MainPlayer.PlayerType.AUDIO.ordinal());
ContextCompat.startForegroundService(context, intent);
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index ba7f18ce8..ffddf94b0 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -143,7 +143,6 @@
Updates
Notification
Playing in background
- Already playing in background
Playing in popup mode
Content
Show age restricted content