Merge pull request #2644 from ByteHamster/progress-bar
Ignore invalid position updates
This commit is contained in:
commit
c82dce79eb
|
@ -209,6 +209,10 @@ public class ExternalPlayerFragment extends Fragment {
|
|||
}
|
||||
|
||||
private void onPositionObserverUpdate() {
|
||||
if (controller.getPosition() == PlaybackService.INVALID_TIME
|
||||
|| controller.getDuration() == PlaybackService.INVALID_TIME) {
|
||||
return;
|
||||
}
|
||||
mProgressBar.setProgress((int)
|
||||
((double) controller.getPosition() / controller.getDuration() * 100));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue