diff --git a/app/src/main/java/de/danoeh/antennapod/receiver/PlayerWidget.java b/app/src/main/java/de/danoeh/antennapod/receiver/PlayerWidget.java index 6d4d9bcd3..7f6dce09c 100644 --- a/app/src/main/java/de/danoeh/antennapod/receiver/PlayerWidget.java +++ b/app/src/main/java/de/danoeh/antennapod/receiver/PlayerWidget.java @@ -40,6 +40,18 @@ public class PlayerWidget extends AppWidgetProvider { startUpdate(context); } + @Override + public void onDisabled(Context context) { + super.onDisabled(context); + stopUpdate(context); + } + + @Override + public void onDeleted(Context context, int[] appWidgetIds) { + super.onDeleted(context, appWidgetIds); + stopUpdate(context); + } + private void startUpdate(Context context) { Log.d(TAG, "startUpdate() called with: " + "context = [" + context + "]"); context.startService(new Intent(context, PlayerWidgetService.class)); diff --git a/app/src/main/res/xml/player_widget_info.xml b/app/src/main/res/xml/player_widget_info.xml index 831f6daf0..4033c3670 100644 --- a/app/src/main/res/xml/player_widget_info.xml +++ b/app/src/main/res/xml/player_widget_info.xml @@ -1,4 +1,9 @@ - + \ No newline at end of file