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
(cherry picked from commit 3a7f940)
  • Loading branch information
rohitjoins authored and christosts committed Jan 25, 2023
1 parent 70a55ef commit 44d12a5
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,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 44d12a5

Please sign in to comment.