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

2
.idea/modules.xml generated
View File

@ -2,8 +2,8 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Aria.iml" filepath="$PROJECT_DIR$/Aria.iml" />
<module fileurl="file://$PROJECT_DIR$/Aria/Aria.iml" filepath="$PROJECT_DIR$/Aria/Aria.iml" />
<module fileurl="file://$PROJECT_DIR$/Aria.iml" filepath="$PROJECT_DIR$/Aria.iml" />
<module fileurl="file://$PROJECT_DIR$/Aria/Aria-Aria.iml" filepath="$PROJECT_DIR$/Aria/Aria-Aria.iml" />
<module fileurl="file://$PROJECT_DIR$/AriaPrj.iml" filepath="$PROJECT_DIR$/AriaPrj.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />

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();