统计下载出错log
This commit is contained in:
@ -113,7 +113,11 @@ public class DownloadTask implements DownloadListener {
|
||||
|
||||
@Override
|
||||
public void onStatusChanged(DownloadStatus status) {
|
||||
onStatusChanged(status, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusChanged(DownloadStatus status, String error) {
|
||||
if (status == DownloadStatus.cancel
|
||||
|| status == DownloadStatus.hijack) {
|
||||
entry.setProgress(0);
|
||||
@ -136,6 +140,7 @@ public class DownloadTask implements DownloadListener {
|
||||
|
||||
/*********************** 处理网络异常 ***********************/
|
||||
if (status == DownloadStatus.timeout || status == DownloadStatus.neterror) {
|
||||
entry.setError(error);
|
||||
DownloadTask task = DataChanger.getInstance().getDownloadingTasks().remove(entry.getUrl());
|
||||
if (task != null) {
|
||||
task.pause();
|
||||
|
||||
Reference in New Issue
Block a user