1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-06-26 15:13:00 +00:00

Player: Remove unused IS_MUTED intent key

The only use of the key was removed in commit
2a2c82e73bb2380c07ab848b185952ab183a5502
but the handling logic stayed around. So let’s get rid of it.
This commit is contained in:
Profpatsch 2025-05-04 15:54:39 +02:00
parent aa1b7f8584
commit 4e8c034c22

View File

@ -162,7 +162,6 @@ public final class Player implements PlaybackListener, Listener {
public static final String RESUME_PLAYBACK = "resume_playback";
public static final String PLAY_WHEN_READY = "play_when_ready";
public static final String PLAYER_TYPE = "player_type";
public static final String IS_MUTED = "is_muted";
/*//////////////////////////////////////////////////////////////////////////
// Time constants
@ -389,7 +388,6 @@ public final class Player implements PlaybackListener, Listener {
final boolean samePlayQueue = playQueue != null && playQueue.equalStreamsAndIndex(newQueue);
final int repeatMode = intent.getIntExtra(REPEAT_MODE, getRepeatMode());
final boolean playWhenReady = intent.getBooleanExtra(PLAY_WHEN_READY, true);
final boolean isMuted = intent.getBooleanExtra(IS_MUTED, isMuted());
/*
* TODO As seen in #7427 this does not work:
@ -447,7 +445,7 @@ public final class Player implements PlaybackListener, Listener {
state.getProgressMillis());
}
initPlayback(newQueue, repeatMode, playbackSpeed, playbackPitch,
playbackSkipSilence, playWhenReady, isMuted);
playbackSkipSilence, playWhenReady);
},
error -> {
if (DEBUG) {
@ -455,19 +453,19 @@ public final class Player implements PlaybackListener, Listener {
}
// In case any error we can start playback without history
initPlayback(newQueue, repeatMode, playbackSpeed, playbackPitch,
playbackSkipSilence, playWhenReady, isMuted);
playbackSkipSilence, playWhenReady);
},
() -> {
// Completed but not found in history
initPlayback(newQueue, repeatMode, playbackSpeed, playbackPitch,
playbackSkipSilence, playWhenReady, isMuted);
playbackSkipSilence, playWhenReady);
}
));
} else {
// Good to go...
// In a case of equal PlayQueues we can re-init old one but only when it is disposed
initPlayback(samePlayQueue ? playQueue : newQueue, repeatMode, playbackSpeed,
playbackPitch, playbackSkipSilence, playWhenReady, isMuted);
playbackPitch, playbackSkipSilence, playWhenReady);
}
if (oldPlayerType != playerType && playQueue != null) {
@ -517,8 +515,7 @@ public final class Player implements PlaybackListener, Listener {
final float playbackSpeed,
final float playbackPitch,
final boolean playbackSkipSilence,
final boolean playOnReady,
final boolean isMuted) {
final boolean playOnReady) {
destroyPlayer();
initPlayer(playOnReady);
setRepeatMode(repeatMode);
@ -530,7 +527,7 @@ public final class Player implements PlaybackListener, Listener {
UIs.call(PlayerUi::initPlayback);
simpleExoPlayer.setVolume(isMuted ? 0 : 1);
simpleExoPlayer.setVolume(isMuted() ? 0 : 1);
notifyQueueUpdateToListeners();
}