Revert "Merge pull request #7568 from vhouriet/vhouriet_feature_already-playing-in-backgroud"

This reverts commit 4a12bedce8, reversing
changes made to 4f06d935cd.
This commit is contained in:
litetex 2022-01-03 15:00:30 +01:00
parent d4bdfa3ea9
commit 34848c7cc3
2 changed files with 4 additions and 9 deletions

View file

@ -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);