Merge branch 'v_3.0' of https://github.com/AriaLyy/Aria into v_3.0

This commit is contained in:
AriaLyy
2017-03-14 15:34:09 +08:00
3 changed files with 6 additions and 2 deletions

View File

@ -226,8 +226,11 @@ final class DownloadUtil implements IDownloadUtil, Runnable {
mListener.supportBreakpoint(false);
Log.w(TAG, "该下载链接不支持断点下载");
handleBreakpoint(conn);
} else if (code == HttpURLConnection.HTTP_NOT_FOUND) {
Log.w(TAG, "任务【" + mDownloadEntity.getDownloadUrl() + "】下载失败错误码404");
mListener.onCancel();
} else {
failDownload("任务【" + mDownloadEntity.getDownloadUrl() + "】下载失败,返回码:" + code);
failDownload("任务【" + mDownloadEntity.getDownloadUrl() + "】下载失败,错误码:" + code);
}
} catch (IOException e) {
failDownload("下载失败【downloadUrl:"

View File

@ -215,6 +215,7 @@ final class UploadUtil implements Runnable {
mHttpConn.disconnect();
} else {
Log.w(TAG, "state_code = " + status);
mListener.onFail();
}
writer.flush();