summaryrefslogtreecommitdiff
path: root/app/src/androidTest
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2021-01-26 12:40:16 +0100
committerByteHamster <info@bytehamster.com>2021-02-03 23:37:51 +0100
commitb6f72f8847f834eecfb392d1c5057d789cc87b04 (patch)
tree07cc1c2bae2120f72d68921d507c8c6251baea5b /app/src/androidTest
parentf3bf708e260822645a65963ff402794cb0cca66e (diff)
downloadAntennaPod-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.java20
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