mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-12-01 12:31:45 +00:00
Fixed possible nullpointerexception in onPositionObserverUpdate()
This commit is contained in:
@ -317,10 +317,12 @@ public abstract class MediaplayerActivity extends SherlockFragmentActivity
|
||||
protected abstract void clearStatusMsg();
|
||||
|
||||
protected void onPositionObserverUpdate() {
|
||||
if (controller != null) {
|
||||
int currentPosition = controller.getPosition();
|
||||
int duration = controller.getDuration();
|
||||
if (currentPosition != PlaybackService.INVALID_TIME
|
||||
&& duration != PlaybackService.INVALID_TIME) {
|
||||
&& duration != PlaybackService.INVALID_TIME
|
||||
&& controller.getMedia() != null) {
|
||||
controller.getMedia().setPosition(currentPosition);
|
||||
txtvPosition.setText(Converter
|
||||
.getDurationStringLong(currentPosition));
|
||||
@ -331,6 +333,7 @@ public abstract class MediaplayerActivity extends SherlockFragmentActivity
|
||||
"Could not react to position observer update because of invalid time");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateProgressbarPosition(int position, int duration) {
|
||||
if (AppConfig.DEBUG)
|
||||
|
||||
Reference in New Issue
Block a user