Skip to content

Commit

Permalink
Fix playback speed not being updated in PlayQueuAcitvity
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiGr authored and spvkgn committed Aug 7, 2021
1 parent e49501a commit 4a8a413
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import android.widget.SeekBar;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.app.ActivityCompat;
Expand Down Expand Up @@ -511,6 +512,7 @@ public void onPlaybackParameterChanged(final float playbackTempo, final float pl
final boolean playbackSkipSilence) {
if (player != null) {
player.setPlaybackParameters(playbackTempo, playbackPitch, playbackSkipSilence);
onPlaybackParameterChanged(player.getPlaybackParameters());
}
}

Expand Down Expand Up @@ -692,7 +694,7 @@ private void onPlayModeChanged(final int repeatMode, final boolean shuffled) {
shuffleButton.setImageAlpha(shuffleAlpha);
}

private void onPlaybackParameterChanged(final PlaybackParameters parameters) {
private void onPlaybackParameterChanged(@Nullable final PlaybackParameters parameters) {
if (parameters != null) {
if (menu != null && player != null) {
final MenuItem item = menu.findItem(R.id.action_playback_speed);
Expand Down

0 comments on commit 4a8a413

Please sign in to comment.