summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java b/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java
index d61a189c2..323060f81 100644
--- a/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java
+++ b/app/src/main/java/de/danoeh/antennapod/service/PlayerWidgetService.java
@@ -128,7 +128,7 @@ public class PlayerWidgetService extends Service {
views.setTextViewText(R.id.txtvTitle, media.getEpisodeTitle());
- String progressString = getProgressString(media);
+ String progressString = getProgressString();
if (progressString != null) {
views.setViewVisibility(R.id.txtvProgress, View.VISIBLE);
views.setTextViewText(R.id.txtvProgress, progressString);
@@ -181,9 +181,9 @@ public class PlayerWidgetService extends Service {
return PendingIntent.getBroadcast(this, 0, startingIntent, 0);
}
- private String getProgressString(Playable media) {
- int position = media.getPosition();
- int duration = media.getDuration();
+ private String getProgressString() {
+ int position = playbackService.getCurrentPosition();
+ int duration = playbackService.getDuration();
if (position > 0 && duration > 0) {
return Converter.getDurationStringLong(position) + " / "
+ Converter.getDurationStringLong(duration);