Skip to content

Commit

Permalink
Fix seekbar enabled/disabled state
Browse files Browse the repository at this point in the history
Signed-off-by: enricocid <enrico2588@gmail.com>
  • Loading branch information
enricocid committed Nov 13, 2018
1 parent 14d7993 commit d33d2f9
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ public void onResume() {
super.onResume();
if (mPlayerAdapter != null && mPlayerAdapter.isMediaPlayer()) {
mPlayerAdapter.onResumeActivity();
if (!mSeekBarAudio.isEnabled()) {
mSeekBarAudio.setEnabled(true);
}
}
}

Expand Down Expand Up @@ -543,14 +540,12 @@ private void updatePlayingInfo(final boolean restore, final boolean startPlay) {
}

private void restorePlayerStatus() {
mSeekBarAudio.setEnabled(mPlayerAdapter.isMediaPlayer());
//if we are playing and the activity was restarted
//update the controls panel
if (mPlayerAdapter != null && mPlayerAdapter.isMediaPlayer()) {
mPlayerAdapter.onResumeActivity();
updatePlayingInfo(true, false);
if (!mSeekBarAudio.isEnabled()) {
mSeekBarAudio.setEnabled(true);
}
}
}

Expand Down

0 comments on commit d33d2f9

Please sign in to comment.