Skip to content
Permalink
Browse files

fix bug #495

fix bug #496
  • Loading branch information...
AriaLyy committed Nov 1, 2019
1 parent 39c485b commit d6993eb1598bec8d750b00e6b146c3b012f17ed6
@@ -401,7 +401,7 @@ private boolean isDialogFragment(Class subClazz) {
return false;
} else {
String parentName = parentClass.getName();
if (mFragmentClassName.contains(parentName)) {
if (mDialogFragmentClassName.contains(parentName)) {
return true;
} else {
return isDialogFragment(parentClass);
@@ -1,5 +1,10 @@
## 开发日志
+ v_3.7
+ v_3.7.4
- 修复一个class被莫名改变的问题
+ v_3.7.3 (2019/10/31)
- fix bug https://github.com/AriaLyy/Aria/issues/495
- fix bug https://github.com/AriaLyy/Aria/issues/496
+ v_3.7.2 (2019/10/28)
- fix bug https://github.com/AriaLyy/Aria/issues/450
- fix bug https://github.com/AriaLyy/Aria/issues/466
- fix bug https://github.com/AriaLyy/Aria/issues/454
@@ -43,6 +43,8 @@

public static final String DOWNLOAD_TEMP_DIR = "/Aria/temp/download/";
public static final String UPLOAD_TEMP_DIR = "/Aria/temp/upload/";
public static final String IGNORE_CLASS_KLASS = "shadow$_klass_";
public static final String IGNORE_CLASS_MONITOR = "shadow$_monitor_";

private static volatile AriaConfig Instance;
private static Context APP;
@@ -48,7 +48,7 @@ public static synchronized ThreadTaskManager getInstance() {
}

private ThreadTaskManager() {
mExePool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
mExePool = Executors.newCachedThreadPool();
}

/**
@@ -16,6 +16,7 @@
package com.arialyy.aria.orm;

import android.text.TextUtils;
import com.arialyy.aria.core.AriaConfig;
import com.arialyy.aria.orm.annotation.Default;
import com.arialyy.aria.orm.annotation.Foreign;
import com.arialyy.aria.orm.annotation.Ignore;
@@ -178,7 +179,8 @@ static boolean isIgnore(Field field) {
int modifiers = field.getModifiers();
String fieldName = field.getName();
return (ignore != null && ignore.value()) || fieldName.equals("rowID") || fieldName.equals(
"shadow$_klass_") || fieldName.equals("shadow$_monitor_") || field.isSynthetic() || Modifier
AriaConfig.IGNORE_CLASS_KLASS) || fieldName.equals(AriaConfig.IGNORE_CLASS_MONITOR)
|| field.isSynthetic() || Modifier
.isStatic(modifiers) || Modifier.isFinal(modifiers);
}

@@ -626,6 +626,16 @@ public static String getString(String preName, Context context, String key) {
Collections.addAll(fields, personClazz.getDeclaredFields());
}
Collections.addAll(fields, clazz.getDeclaredFields());
List<Field> ignore = new ArrayList<>();
for (Field field : fields) {
if (field.getName().equals(AriaConfig.IGNORE_CLASS_KLASS) || field.getName()
.equals(AriaConfig.IGNORE_CLASS_MONITOR)) {
ignore.add(field);
}
}
if (!ignore.isEmpty()){
fields.removeAll(ignore);
}
return fields;
}

@@ -44,16 +44,16 @@ Aria有以下特点:

## 引入库
[![license](http://img.shields.io/badge/license-Apache2.0-brightgreen.svg?style=flat)](https://github.com/AriaLyy/Aria/blob/master/LICENSE)
[![Core](https://img.shields.io/badge/Core-3.7.2-blue)](https://github.com/AriaLyy/Aria)
[![Compiler](https://img.shields.io/badge/Compiler-3.7.2-blue)](https://github.com/AriaLyy/Aria)
[![FtpComponent](https://img.shields.io/badge/FtpComponent-3.7.2-orange)](https://github.com/AriaLyy/Aria)
[![M3U8Component](https://img.shields.io/badge/M3U8Component-3.7.2-orange)](https://github.com/AriaLyy/Aria)
[![Core](https://img.shields.io/badge/Core-3.7.3-blue)](https://github.com/AriaLyy/Aria)
[![Compiler](https://img.shields.io/badge/Compiler-3.7.3-blue)](https://github.com/AriaLyy/Aria)
[![FtpComponent](https://img.shields.io/badge/FtpComponent-3.7.3-orange)](https://github.com/AriaLyy/Aria)
[![M3U8Component](https://img.shields.io/badge/M3U8Component-3.7.3-orange)](https://github.com/AriaLyy/Aria)

```java
implementation 'com.arialyy.aria:core:3.7.2'
annotationProcessor 'com.arialyy.aria:compiler:3.7.2'
implementation 'com.arialyy.aria:ftpComponent:3.7.2' # 如果需要使用ftp,请增加该组件
implementation 'com.arialyy.aria:m3u8Component:3.7.2' # 如果需要使用m3u8下载功能,请增加该组件
implementation 'com.arialyy.aria:core:3.7.3'
annotationProcessor 'com.arialyy.aria:compiler:3.7.3'
implementation 'com.arialyy.aria:ftpComponent:3.7.3' # 如果需要使用ftp,请增加该组件
implementation 'com.arialyy.aria:m3u8Component:3.7.3' # 如果需要使用m3u8下载功能,请增加该组件
```
如果出现android support依赖错误,请将 `compile 'com.arialyy.aria:aria-core:<last-version>'`替换为
```
@@ -137,23 +137,9 @@ protected void onCreate(Bundle savedInstanceState) {


### 版本日志
+ v_3.7
- fix bug https://github.com/AriaLyy/Aria/issues/450
- fix bug https://github.com/AriaLyy/Aria/issues/466
- fix bug https://github.com/AriaLyy/Aria/issues/454
- fix bug https://github.com/AriaLyy/Aria/issues/467
- fix bug https://github.com/AriaLyy/Aria/issues/459
- fix bug https://github.com/AriaLyy/Aria/issues/487
- fix bug https://github.com/AriaLyy/Aria/issues/483
- fix bug https://github.com/AriaLyy/Aria/issues/482
- fix bug https://github.com/AriaLyy/Aria/issues/473
- 移除隐藏api的反射 https://github.com/AriaLyy/Aria/issues/456
- 新增ftp免证书登陆功能h ttps://github.com/AriaLyy/Aria/issues/455
- 适配androidX
- 修复组合任务,恢复下载,会出现进度显示为0的问题
- m3u8点播下载新增创建ts索引功能
- 修复多任务的m3u8点播下载时,一个任务调用`jumpIndex`,其它m3u8任务也会自动调用`jumpIndex`的问题
- 添加权限检查
+ v_3.7.3
- fix bug https://github.com/AriaLyy/Aria/issues/495
- fix bug https://github.com/AriaLyy/Aria/issues/496

[更多版本记录](https://github.com/AriaLyy/Aria/blob/master/DEV_LOG.md)

@@ -47,9 +47,10 @@
* 单任务下载的信息
*/
LiveData<DownloadEntity> getHttpDownloadInfo(Context context) {
String url = AppUtil.getConfigValue(context, HTTP_URL_KEY, defUrl);
//String url = AppUtil.getConfigValue(context, HTTP_URL_KEY, defUrl);
//String url =
// "http://sdkdown.muzhiwan.com/openfile/2019/05/21/com.netease.tom.mzw_5ce3ef8754d05.apk";
String url = "http://image.totwoo.com/totwoo-TOTWOO-v3.5.6.apk";
String filePath = AppUtil.getConfigValue(context, HTTP_PATH_KEY, defFilePath);

singDownloadInfo = Aria.download(context).getFirstDownloadEntity(url);
@@ -289,8 +289,8 @@ public void onClick(View view) {
private void startD() {
HttpOption option = new HttpOption();
option.addHeader("1", "@")
.setFileLenAdapter(new FileLenAdapter())
.useServerFileName(true);
.useServerFileName(true)
.setFileLenAdapter(new FileLenAdapter());
mTaskId = Aria.download(SingleTaskActivity.this)
.load(mUrl)
.setFilePath(mFilePath, true)
@@ -257,7 +257,11 @@ private int getColor(int color) {
case IEntity.STATE_STOP:
case IEntity.STATE_PRE:
case IEntity.STATE_POST_PRE:
start(entity);
if (entity.getId() < 0){
start(entity);
}else {
resume(entity);
}
break;
case IEntity.STATE_RUNNING:
stop(entity);
@@ -291,6 +295,24 @@ private void cancel(AbsEntity entity) {
}
}

private void resume(AbsEntity entity){
switch (entity.getTaskType()) {
case AbsTaskWrapper.D_FTP:
//Aria.download(getContext()).loadFtp((DownloadEntity) entity).login("lao", "123456").create();
Aria.download(getContext()).loadFtp(entity.getId()).resume();
break;
case AbsTaskWrapper.D_FTP_DIR:
Aria.download(getContext()).loadFtpDir(entity.getId()).resume();
break;
case AbsTaskWrapper.D_HTTP:
Aria.download(getContext()).load(entity.getId()).resume();
break;
case AbsTaskWrapper.DG_HTTP:
Aria.download(getContext()).loadGroup(entity.getId()).resume();
break;
}
}

private void start(AbsEntity entity) {
switch (entity.getTaskType()) {
case AbsTaskWrapper.D_FTP:
@@ -103,6 +103,9 @@
}

@Download.onTaskFail void taskFail(DownloadTask task) {
if (task == null || task.getEntity() == null){
return;
}
mAdapter.updateState(task.getEntity());
}

@@ -101,6 +101,9 @@ public void onClick(View view) {
}

@Download.onTaskFail void taskFail(DownloadTask task) {
if (task == null || task.getEntity() == null){
return;
}
mAdapter.updateBtState(task.getKey(), true);
}

@@ -44,8 +44,8 @@ task clean(type: Delete) {
}

ext {
versionCode = 372
versionName = '3.7.2'
versionCode = 373
versionName = '3.7.3'
userOrg = 'arialyy'
groupId = 'com.arialyy.aria'
publishVersion = versionName

0 comments on commit d6993eb

Please sign in to comment.
You can’t perform that action at this time.