Skip to content

Commit

Permalink
Merge pull request #10776 from dongvanhung:feature/add_support_clear_…
Browse files Browse the repository at this point in the history
…download_manager_helpers

PiperOrigin-RevId: 491336828
  • Loading branch information
rohitjoins committed Nov 29, 2022
2 parents 5292e40 + 0d2e437 commit 3581ccd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Release notes
([#10604](https://github.com/google/ExoPlayer/issues/10604)).
* Add `ExoPlayer.Builder.setPlaybackLooper` that sets a pre-existing
playback thread for a new ExoPlayer instance.
* Allow download manager helpers to be cleared
([#10776](https://github.com/google/ExoPlayer/issues/10776)).
* Session:
* Add helper method to convert platform session token to Media3
`SessionToken` ([#171](https://github.com/androidx/media/issues/171)).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,17 @@ public static void startForeground(Context context, Class<? extends DownloadServ
Util.startForegroundService(context, intent);
}

/**
* Clear all {@linkplain DownloadManagerHelper download manager helpers} before restarting the
* service.
*
* <p>Calling this method is normally only required if an app supports downloading content for
* multiple users for which different download directories should be used.
*/
public static void clearDownloadManagerHelpers() {
downloadManagerHelpers.clear();
}

@Override
public void onCreate() {
if (channelId != null) {
Expand Down

0 comments on commit 3581ccd

Please sign in to comment.