diff --git a/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadService.java b/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadService.java index 8170c497433..5b26381ee79 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadService.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadService.java @@ -869,6 +869,14 @@ private static void startService(Context context, Intent intent, boolean foregro } } + /** + * Clear all DownloadManagerHelper to restart the new service. + */ + public static void clearDownloadManagerHelpers() { + downloadManagerHelpers.clear(); + } + + private final class ForegroundNotificationUpdater { private final int notificationId;