fix: 修复进入下载管理自动下载已暂停游戏的问题
Signed-off-by: chenjuntao <chenjuntao@ghzhushou.com>
This commit is contained in:
@ -1008,7 +1008,7 @@ public class DownloadManager implements DownloadStatusListener {
|
||||
}
|
||||
|
||||
startDownloadService();
|
||||
checkAndRetryDownload();
|
||||
checkAndRetryDownload(true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1099,14 +1099,14 @@ public class DownloadManager implements DownloadStatusListener {
|
||||
/**
|
||||
* 检查并尝试重试下载
|
||||
*/
|
||||
public void checkAndRetryDownload() {
|
||||
public void checkAndRetryDownload(boolean includePausedTask) {
|
||||
if (!NetworkUtils.isWifiConnected(mContext)) return;
|
||||
|
||||
for (DownloadEntity downloadEntity : DownloadManager.getInstance().getAllDownloadEntityExcludeDoneTask()) {
|
||||
if (DownloadStatus.neterror.equals(downloadEntity.getStatus())
|
||||
|| DownloadStatus.timeout.equals(downloadEntity.getStatus())
|
||||
|| DownloadStatus.subscribe.equals(downloadEntity.getStatus())
|
||||
|| DownloadStatus.pause.equals(downloadEntity.getStatus())
|
||||
|| (includePausedTask && DownloadStatus.pause.equals(downloadEntity.getStatus()))
|
||||
) {
|
||||
DownloadManager.getInstance().put(downloadEntity.getUrl(), System.currentTimeMillis());
|
||||
Message msg = Message.obtain();
|
||||
|
||||
Reference in New Issue
Block a user