diff options
author | ByteHamster <info@bytehamster.com> | 2021-01-26 12:40:16 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2021-02-03 23:37:51 +0100 |
commit | b6f72f8847f834eecfb392d1c5057d789cc87b04 (patch) | |
tree | 07cc1c2bae2120f72d68921d507c8c6251baea5b /app/src/androidTest | |
parent | f3bf708e260822645a65963ff402794cb0cca66e (diff) | |
download | AntennaPod-b6f72f8847f834eecfb392d1c5057d789cc87b04.zip |
Reduce coupling between widget and playback service
Instead of binding to the service, pass the required data. This also
ensures that the widget is updated instantly when calling from
PlaybackService. JobService had the problem that the OS sometimes
took some seconds before actually executing the job.
Diffstat (limited to 'app/src/androidTest')
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceTaskManagerTest.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceTaskManagerTest.java b/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceTaskManagerTest.java index f039c8bdf..ddd4fe899 100644 --- a/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceTaskManagerTest.java +++ b/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceTaskManagerTest.java @@ -6,6 +6,7 @@ import androidx.test.annotation.UiThreadTest; import androidx.test.filters.LargeTest; import de.danoeh.antennapod.core.preferences.SleepTimerPreferences; +import de.danoeh.antennapod.core.widget.WidgetUpdater; import org.awaitility.Awaitility; import org.greenrobot.eventbus.EventBus; import org.junit.After; @@ -187,8 +188,8 @@ public class PlaybackServiceTaskManagerTest { } @Override - public void onWidgetUpdaterTick() { - + public WidgetUpdater.WidgetState requestWidgetState() { + return null; } @Override @@ -248,8 +249,9 @@ public class PlaybackServiceTaskManagerTest { } @Override - public void onWidgetUpdaterTick() { + public WidgetUpdater.WidgetState requestWidgetState() { countDownLatch.countDown(); + return null; } @Override @@ -348,8 +350,8 @@ public class PlaybackServiceTaskManagerTest { } @Override - public void onWidgetUpdaterTick() { - + public WidgetUpdater.WidgetState requestWidgetState() { + return null; } @Override @@ -391,8 +393,8 @@ public class PlaybackServiceTaskManagerTest { } @Override - public void onWidgetUpdaterTick() { - + public WidgetUpdater.WidgetState requestWidgetState() { + return null; } @Override @@ -449,8 +451,8 @@ public class PlaybackServiceTaskManagerTest { } @Override - public void onWidgetUpdaterTick() { - + public WidgetUpdater.WidgetState requestWidgetState() { + return null; } @Override |