summaryrefslogtreecommitdiff
path: root/app/src/main/java
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/main/java
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/main/java')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java
index 1b4e8b81e..3020aba43 100644
--- a/app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java
+++ b/app/src/main/java/de/danoeh/antennapod/activity/WidgetConfigActivity.java
@@ -19,7 +19,7 @@ import androidx.core.content.ContextCompat;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.preferences.UserPreferences;
import de.danoeh.antennapod.core.receiver.PlayerWidget;
-import de.danoeh.antennapod.core.service.PlayerWidgetJobService;
+import de.danoeh.antennapod.core.widget.WidgetUpdaterJobService;
public class WidgetConfigActivity extends AppCompatActivity {
private int appWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;
@@ -127,7 +127,7 @@ public class WidgetConfigActivity extends AppCompatActivity {
resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
setResult(RESULT_OK, resultValue);
finish();
- PlayerWidgetJobService.updateWidget(this);
+ WidgetUpdaterJobService.performBackgroundUpdate(this);
}
private int getColorWithAlpha(int color, int opacity) {