Merge pull request #10776 from dongvanhung:feature/add_support_clear_download_manager_helpers

PiperOrigin-RevId: 491336828
(cherry picked from commit 3a7f940f41e278cde88c29201191229ed7d39e49)
This commit is contained in:
Rohit Singh 2022-11-29 19:23:32 +00:00 committed by christosts
parent 70a55ef7e9
commit 44d12a5070

View File

@ -573,6 +573,17 @@ public abstract class DownloadService extends Service {
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) {