pull/330/head
parent
219275bf23
commit
f9a65fe38b
@ -0,0 +1,77 @@ |
||||
/* |
||||
* Copyright (C) 2016 AriaLyy(https://github.com/AriaLyy/Aria)
|
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package com.arialyy.aria.core; |
||||
|
||||
import com.arialyy.aria.orm.DbEntity; |
||||
|
||||
/** |
||||
* Created by Aria.Lao on 2017/8/29. |
||||
* 错误实体 |
||||
*/ |
||||
public class ErrorEntity extends DbEntity { |
||||
|
||||
/** |
||||
* 插入时间 |
||||
*/ |
||||
public long insertTime; |
||||
|
||||
/** |
||||
* 错误信息 |
||||
*/ |
||||
public String err; |
||||
|
||||
/** |
||||
* 任务名 |
||||
*/ |
||||
public String taskName; |
||||
|
||||
/** |
||||
*任务类型 |
||||
*/ |
||||
public String taskType; |
||||
|
||||
/** |
||||
* 提示 |
||||
*/ |
||||
public String msg; |
||||
|
||||
/** |
||||
* 任务key |
||||
*/ |
||||
public String key; |
||||
|
||||
@Override public String toString() { |
||||
return "ErrorEntity{" |
||||
+ "insertTime=" |
||||
+ insertTime |
||||
+ ", err='" |
||||
+ err |
||||
+ '\'' |
||||
+ ", taskName='" |
||||
+ taskName |
||||
+ '\'' |
||||
+ ", taskType='" |
||||
+ taskType |
||||
+ '\'' |
||||
+ ", msg='" |
||||
+ msg |
||||
+ '\'' |
||||
+ ", key='" |
||||
+ key |
||||
+ '\'' |
||||
+ '}'; |
||||
} |
||||
} |
@ -0,0 +1,58 @@ |
||||
/* |
||||
* Copyright (C) 2016 AriaLyy(https://github.com/AriaLyy/Aria)
|
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
package com.arialyy.aria.util; |
||||
|
||||
import com.arialyy.aria.core.ErrorEntity; |
||||
import com.arialyy.aria.core.download.DownloadEntity; |
||||
import com.arialyy.aria.core.download.DownloadGroupEntity; |
||||
import com.arialyy.aria.core.inf.AbsEntity; |
||||
import com.arialyy.aria.core.upload.UploadEntity; |
||||
|
||||
/** |
||||
* Created by Aria.Lao on 2017/8/29. |
||||
* 错误帮助类 |
||||
*/ |
||||
public class ErrorHelp { |
||||
|
||||
/** |
||||
* 保存错误信息 |
||||
* |
||||
* @param taskType 任务类型 |
||||
* @param entity 任务实体 |
||||
* @param msg 错误提示 |
||||
* @param ex 异常 |
||||
*/ |
||||
public static void saveError(String taskType, AbsEntity entity, String msg, String ex) { |
||||
ErrorEntity errorEntity = new ErrorEntity(); |
||||
errorEntity.insertTime = System.currentTimeMillis(); |
||||
errorEntity.err = ex; |
||||
errorEntity.msg = msg; |
||||
errorEntity.taskType = taskType; |
||||
String name = ""; |
||||
String key = entity.getKey(); |
||||
if (entity instanceof DownloadEntity) { |
||||
name = ((DownloadEntity) entity).getFileName(); |
||||
} else if (entity instanceof DownloadGroupEntity) { |
||||
name = ((DownloadGroupEntity) entity).getGroupName(); |
||||
} else if (entity instanceof UploadEntity) { |
||||
name = ((UploadEntity) entity).getFileName(); |
||||
} |
||||
|
||||
errorEntity.taskName = name; |
||||
errorEntity.key = key; |
||||
errorEntity.insert(); |
||||
} |
||||
} |
@ -0,0 +1,29 @@ |
||||
## 开发日志 |
||||
+ v_3.2.17 修复一个版本兼容性问题,线程中使用Aria出错问题 |
||||
+ v_3.2.15 修复大型文件分段下载失败的问题,修复中文URL乱码问题 |
||||
+ v_3.2.14 修复恢复所有任务的api接口,不能恢复下载组任务的问题 |
||||
+ v_3.2.13 修复某些服务器头文件返回描述文件格式错误的问题、修复有时删除任务,需要两次删除的问题 |
||||
+ v_3.2.12 实现FTP多线程断点续传下载,FTP断点续传上传功能 |
||||
+ v_3.2.9 修复任务组下载完成两次回掉的问题,修复又是获取不到下载状态的问题 |
||||
+ v_3.2.8 修复下载超过2G大小的文件失败的问题 |
||||
+ v_3.2.7 移除设置文件名的api接口,修复断开网络时出现的进度条错误的问题 |
||||
+ v_3.2.6 移除广播事件,增加任务组下载功能 |
||||
+ v_3.1.9 修复stopAll队列没有任务时崩溃的问题,增加针对单个任务监听的功能 |
||||
+ v_3.1.7 修复某些文件下载不了的bug,增加apt注解方法,事件获取更加简单了 |
||||
+ v_3.1.6 取消任务时onTaskCancel回调两次的bug |
||||
+ v_3.1.5 优化代码结构,增加优先下载任务功能。 |
||||
+ v_3.1.4 修复快速切换,暂停、恢复功能时,概率性出现的重新下载问题,添加onPre()回调,onPre()用于请求地址之前执行界面UI更新操作。 |
||||
+ v_3.1.0 添加Aria配置文件,优化代码 |
||||
+ v_3.0.3 修复暂停后删除任务,闪退问题,添加删除记录的api |
||||
+ v_3.0.2 支持30x重定向链接下载 |
||||
+ v_3.0.0 添加上传任务支持,修复一些已发现的bug |
||||
+ v_2.4.4 修复不支持断点的下载链接拿不到文件大小的问题 |
||||
+ v_2.4.3 修复404链接卡顿的问题 |
||||
+ v_2.4.2 修复失败重试无效的bug |
||||
+ v_2.4.1 修复下载慢的问题,修复application、service 不能使用的问题 |
||||
+ v_2.4.0 支持https链接下载 |
||||
+ v_2.3.8 修复数据错乱的bug、添加fragment支持 |
||||
+ v_2.3.6 添加dialog、popupWindow支持 |
||||
+ v_2.3.3 添加断点支持、修改下载逻辑,让使用更加简单、修复一个内存泄露的bug |
||||
+ v_2.3.1 重命名为Aria,下载流程简化 |
||||
+ v_2.1.1 增加,选择最大下载任务数接口 |
Loading…
Reference in new issue