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:
parent
70a55ef7e9
commit
44d12a5070
@ -573,6 +573,17 @@ public abstract class DownloadService extends Service {
|
|||||||
Util.startForegroundService(context, intent);
|
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
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
if (channelId != null) {
|
if (channelId != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user