diff --git a/Aria/build.gradle b/Aria/build.gradle index 4ba96047..a4c51283 100644 --- a/Aria/build.gradle +++ b/Aria/build.gradle @@ -7,8 +7,8 @@ android { defaultConfig { minSdkVersion 9 targetSdkVersion 23 - versionCode 58 - versionName "2.3.0" + versionCode 79 + versionName "2.3.1" } buildTypes { release { diff --git a/Aria/src/main/java/com/arialyy/aria/core/AMReceiver.java b/Aria/src/main/java/com/arialyy/aria/core/AMReceiver.java index 8205242d..f1714319 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/AMReceiver.java +++ b/Aria/src/main/java/com/arialyy/aria/core/AMReceiver.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. @@ -18,6 +18,7 @@ package com.arialyy.aria.core; import com.arialyy.aria.core.scheduler.OnSchedulerListener; /** + * Created by lyy on 2016/12/5. * AM 接收器 */ public class AMReceiver { diff --git a/Aria/src/main/java/com/arialyy/aria/core/AMTarget.java b/Aria/src/main/java/com/arialyy/aria/core/AMTarget.java index cc1da45d..b5fdd61c 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/AMTarget.java +++ b/Aria/src/main/java/com/arialyy/aria/core/AMTarget.java @@ -1,3 +1,18 @@ +/* + * 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.core.command.CmdFactory; @@ -9,7 +24,8 @@ import java.util.ArrayList; import java.util.List; /** - * Created by utstarcom on 2016/12/5. + * Created by lyy on 2016/12/5. + * https://github.com/AriaLyy/Aria */ public class AMTarget { private AMReceiver receiver; diff --git a/Aria/src/main/java/com/arialyy/aria/core/Aria.java b/Aria/src/main/java/com/arialyy/aria/core/Aria.java index e6557e1f..bfb884f9 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/Aria.java +++ b/Aria/src/main/java/com/arialyy/aria/core/Aria.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. @@ -26,6 +26,7 @@ import android.os.Build; /** * Created by lyy on 2016/12/1. + * https://github.com/AriaLyy/Aria * Aria启动,管理全局任务 */ @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) public class Aria { diff --git a/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java b/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java index 4eff1677..8ea0ded5 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java +++ b/Aria/src/main/java/com/arialyy/aria/core/AriaManager.java @@ -1,3 +1,18 @@ +/* + * 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 android.annotation.TargetApi; @@ -8,10 +23,12 @@ import android.content.Context; import android.os.Build; import android.os.Bundle; import android.support.v4.app.Fragment; +import android.text.TextUtils; import android.util.Log; import com.arialyy.aria.core.command.CmdFactory; import com.arialyy.aria.util.CommonUtil; import com.arialyy.aria.core.command.IDownloadCmd; +import com.arialyy.aria.util.Configuration; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -20,6 +37,7 @@ import java.util.Set; /** * Created by lyy on 2016/12/1. + * https://github.com/AriaLyy/Aria * Aria管理器,任务操作在这里执行 */ @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public class AriaManager { @@ -48,6 +66,24 @@ import java.util.Set; return getTarget(obj); } + /** + * 获取下载列表 + */ + public List getDownloadList(){ + return DownloadEntity.findAllData(DownloadEntity.class); + } + + /** + * 通过下载链接获取下载实体 + */ + public DownloadEntity getDownloadEntity(String downloadUrl) { + if (TextUtils.isEmpty(downloadUrl)) { + throw new IllegalArgumentException("下载链接不能为null"); + } + return DownloadEntity.findData(DownloadEntity.class, new String[] { "downloadUrl" }, + new String[] { downloadUrl }); + } + /** * 停止所有正在执行的任务 */ @@ -63,10 +99,36 @@ import java.util.Set; } /** - * 是否打开下载广播 + * 设置下载超时时间 */ - public void openBroadcast(boolean open) { + @Deprecated + private AriaManager setTimeOut(int timeOut) { + Configuration.getInstance().setTimeOut(timeOut); + return this; + } + /** + * 设置下载失败重试次数 + */ + public AriaManager setReTryNum(int reTryNum) { + Configuration.getInstance().setReTryNum(reTryNum); + return this; + } + + /** + * 设置下载失败重试间隔 + */ + public AriaManager setReTryInterval(int interval) { + Configuration.getInstance().setReTryInterval(interval); + return this; + } + + /** + * 是否打开下载广播 + */ + public AriaManager openBroadcast(boolean open) { + Configuration.getInstance().setOpenBroadcast(open); + return this; } /** @@ -74,12 +136,13 @@ import java.util.Set; * * @param maxDownloadNum 最大下载数 */ - public void setMaxDownloadNum(int maxDownloadNum) { - if (maxDownloadNum < 1){ + public AriaManager setMaxDownloadNum(int maxDownloadNum) { + if (maxDownloadNum < 1) { Log.w(TAG, "最大任务数不能小于 1"); - return; + return this; } mManager.getTaskQueue().setDownloadNum(maxDownloadNum); + return this; } /** diff --git a/Aria/src/main/java/com/arialyy/aria/core/DownloadEntity.java b/Aria/src/main/java/com/arialyy/aria/core/DownloadEntity.java index 32b040c6..53b69824 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/DownloadEntity.java +++ b/Aria/src/main/java/com/arialyy/aria/core/DownloadEntity.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/DownloadManager.java b/Aria/src/main/java/com/arialyy/aria/core/DownloadManager.java index a50906ad..19afbf70 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/DownloadManager.java +++ b/Aria/src/main/java/com/arialyy/aria/core/DownloadManager.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/AddCmd.java b/Aria/src/main/java/com/arialyy/aria/core/command/AddCmd.java index e79b37db..8781fe29 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/AddCmd.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/AddCmd.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/CancelCmd.java b/Aria/src/main/java/com/arialyy/aria/core/command/CancelCmd.java index 01af9af8..bac903de 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/CancelCmd.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/CancelCmd.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/CmdFactory.java b/Aria/src/main/java/com/arialyy/aria/core/command/CmdFactory.java index e8003efe..8b676ee2 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/CmdFactory.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/CmdFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/IDownloadCmd.java b/Aria/src/main/java/com/arialyy/aria/core/command/IDownloadCmd.java index a61650ba..80d85237 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/IDownloadCmd.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/IDownloadCmd.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/SingleCmd.java b/Aria/src/main/java/com/arialyy/aria/core/command/SingleCmd.java index f8da683d..fda9cff9 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/SingleCmd.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/SingleCmd.java @@ -1,3 +1,18 @@ +/* + * 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.command; import android.util.Log; diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/StartCmd.java b/Aria/src/main/java/com/arialyy/aria/core/command/StartCmd.java index 295089cf..66f06118 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/StartCmd.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/StartCmd.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/StopCmd.java b/Aria/src/main/java/com/arialyy/aria/core/command/StopCmd.java index c696e5b6..9002b90b 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/StopCmd.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/StopCmd.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/queue/DownloadTaskQueue.java b/Aria/src/main/java/com/arialyy/aria/core/queue/DownloadTaskQueue.java index d0c3268c..65c6f35b 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/queue/DownloadTaskQueue.java +++ b/Aria/src/main/java/com/arialyy/aria/core/queue/DownloadTaskQueue.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/queue/IDownloader.java b/Aria/src/main/java/com/arialyy/aria/core/queue/IDownloader.java index 2534c69c..601e54ed 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/queue/IDownloader.java +++ b/Aria/src/main/java/com/arialyy/aria/core/queue/IDownloader.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/queue/IPool.java b/Aria/src/main/java/com/arialyy/aria/core/queue/IPool.java index 615c5146..f41258f4 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/queue/IPool.java +++ b/Aria/src/main/java/com/arialyy/aria/core/queue/IPool.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/queue/ITaskQueue.java b/Aria/src/main/java/com/arialyy/aria/core/queue/ITaskQueue.java index f70059db..d558c668 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/queue/ITaskQueue.java +++ b/Aria/src/main/java/com/arialyy/aria/core/queue/ITaskQueue.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/scheduler/DownloadSchedulers.java b/Aria/src/main/java/com/arialyy/aria/core/scheduler/DownloadSchedulers.java index 16e59274..3e952b51 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/scheduler/DownloadSchedulers.java +++ b/Aria/src/main/java/com/arialyy/aria/core/scheduler/DownloadSchedulers.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/scheduler/IDownloadSchedulers.java b/Aria/src/main/java/com/arialyy/aria/core/scheduler/IDownloadSchedulers.java index a6d3fcf5..d8b2fda9 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/scheduler/IDownloadSchedulers.java +++ b/Aria/src/main/java/com/arialyy/aria/core/scheduler/IDownloadSchedulers.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/scheduler/OnSchedulerListener.java b/Aria/src/main/java/com/arialyy/aria/core/scheduler/OnSchedulerListener.java index d36d5a3e..baa584af 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/scheduler/OnSchedulerListener.java +++ b/Aria/src/main/java/com/arialyy/aria/core/scheduler/OnSchedulerListener.java @@ -1,3 +1,18 @@ +/* + * 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.scheduler; import com.arialyy.aria.core.task.Task; diff --git a/Aria/src/main/java/com/arialyy/aria/core/task/DownloadListener.java b/Aria/src/main/java/com/arialyy/aria/core/task/DownloadListener.java index ac1f96ff..a0e9b8b8 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/task/DownloadListener.java +++ b/Aria/src/main/java/com/arialyy/aria/core/task/DownloadListener.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/task/DownloadUtil.java b/Aria/src/main/java/com/arialyy/aria/core/task/DownloadUtil.java index c093cf9b..032809b1 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/task/DownloadUtil.java +++ b/Aria/src/main/java/com/arialyy/aria/core/task/DownloadUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/task/IDownloadListener.java b/Aria/src/main/java/com/arialyy/aria/core/task/IDownloadListener.java index 3b1704d8..78a5d604 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/task/IDownloadListener.java +++ b/Aria/src/main/java/com/arialyy/aria/core/task/IDownloadListener.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/task/IDownloadUtil.java b/Aria/src/main/java/com/arialyy/aria/core/task/IDownloadUtil.java index 83bb0f53..5c4e29f6 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/task/IDownloadUtil.java +++ b/Aria/src/main/java/com/arialyy/aria/core/task/IDownloadUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/core/task/Task.java b/Aria/src/main/java/com/arialyy/aria/core/task/Task.java index 0ce8c6ca..8aa4d918 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/task/Task.java +++ b/Aria/src/main/java/com/arialyy/aria/core/task/Task.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. @@ -25,6 +25,7 @@ import com.arialyy.aria.core.DownloadManager; import com.arialyy.aria.core.scheduler.DownloadSchedulers; import com.arialyy.aria.core.scheduler.IDownloadSchedulers; import com.arialyy.aria.core.DownloadEntity; +import com.arialyy.aria.util.Configuration; /** * Created by lyy on 2016/8/11. @@ -325,7 +326,9 @@ public class Task { if (location != -1) { intent.putExtra(DownloadManager.CURRENT_LOCATION, location); } - //context.sendBroadcast(intent); + if (Configuration.isOpenBreadCast) { + context.sendBroadcast(intent); + } } } } \ No newline at end of file diff --git a/Aria/src/main/java/com/arialyy/aria/core/task/TaskFactory.java b/Aria/src/main/java/com/arialyy/aria/core/task/TaskFactory.java index f057dee4..8cc1b710 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/task/TaskFactory.java +++ b/Aria/src/main/java/com/arialyy/aria/core/task/TaskFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/orm/DbEntity.java b/Aria/src/main/java/com/arialyy/aria/orm/DbEntity.java index 15581067..1d24fd33 100644 --- a/Aria/src/main/java/com/arialyy/aria/orm/DbEntity.java +++ b/Aria/src/main/java/com/arialyy/aria/orm/DbEntity.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/orm/DbUtil.java b/Aria/src/main/java/com/arialyy/aria/orm/DbUtil.java index d0053879..a8c3bdab 100644 --- a/Aria/src/main/java/com/arialyy/aria/orm/DbUtil.java +++ b/Aria/src/main/java/com/arialyy/aria/orm/DbUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/orm/Id.java b/Aria/src/main/java/com/arialyy/aria/orm/Id.java index 70dfb70a..e6861025 100644 --- a/Aria/src/main/java/com/arialyy/aria/orm/Id.java +++ b/Aria/src/main/java/com/arialyy/aria/orm/Id.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/orm/Ignore.java b/Aria/src/main/java/com/arialyy/aria/orm/Ignore.java index 8cd77d8a..1b3c1359 100644 --- a/Aria/src/main/java/com/arialyy/aria/orm/Ignore.java +++ b/Aria/src/main/java/com/arialyy/aria/orm/Ignore.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/orm/SqlHelper.java b/Aria/src/main/java/com/arialyy/aria/orm/SqlHelper.java index f58b7961..a7b6c669 100644 --- a/Aria/src/main/java/com/arialyy/aria/orm/SqlHelper.java +++ b/Aria/src/main/java/com/arialyy/aria/orm/SqlHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/util/CheckUtil.java b/Aria/src/main/java/com/arialyy/aria/util/CheckUtil.java index 2b07ec87..ba70cda1 100644 --- a/Aria/src/main/java/com/arialyy/aria/util/CheckUtil.java +++ b/Aria/src/main/java/com/arialyy/aria/util/CheckUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/util/CommonUtil.java b/Aria/src/main/java/com/arialyy/aria/util/CommonUtil.java index 30247c37..bdcf94c2 100644 --- a/Aria/src/main/java/com/arialyy/aria/util/CommonUtil.java +++ b/Aria/src/main/java/com/arialyy/aria/util/CommonUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/Aria/src/main/java/com/arialyy/aria/util/Configuration.java b/Aria/src/main/java/com/arialyy/aria/util/Configuration.java index 90fe78a5..de3703d7 100644 --- a/Aria/src/main/java/com/arialyy/aria/util/Configuration.java +++ b/Aria/src/main/java/com/arialyy/aria/util/Configuration.java @@ -1,3 +1,18 @@ +/* + * 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 android.util.Log; @@ -36,6 +51,7 @@ public class Configuration { * 超时时间,默认 10000 ms */ private static final String DOWNLOAD_TIME_OUT = "DOWNLOAD_TIME_OUT"; + public static boolean isOpenBreadCast = false; private static Configuration INSTANCE = null; private File mConfigFile = null; @@ -57,6 +73,8 @@ public class Configuration { mConfigFile.getParentFile().mkdirs(); mConfigFile.createNewFile(); init(); + }else { + isOpenBreadCast = isOpenBroadcast(); } } catch (IOException e) { e.printStackTrace(); @@ -123,7 +141,7 @@ public class Configuration { /** * 设置重试间隔 */ - public void setReTryreTryInterval(int reTryInterval) { + public void setReTryInterval(int reTryInterval) { if (reTryInterval < 4000) { Log.w(TAG, "重试间隔不能小于4000ms"); return; @@ -184,6 +202,7 @@ public class Configuration { * 设置是否打开下载广播 */ public void setOpenBroadcast(boolean openBroadcast) { + isOpenBreadCast = openBroadcast; save(OPEN_BROADCAST, openBroadcast + ""); } } diff --git a/Aria/src/main/java/com/arialyy/aria/util/PathUtil.java b/Aria/src/main/java/com/arialyy/aria/util/PathUtil.java index 53e810d6..ed7efc5a 100644 --- a/Aria/src/main/java/com/arialyy/aria/util/PathUtil.java +++ b/Aria/src/main/java/com/arialyy/aria/util/PathUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/README.md b/README.md index ef22d2d8..99709f76 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,88 @@ -# DownloadUtil +# Aria ![图标](https://github.com/AriaLyy/DownloadUtil/blob/v_2.0/app/src/main/res/mipmap-hdpi/ic_launcher.png)
-这是一个 android 智能切换多任务断点续传工具,使用该工具,你可以很容易实现`多线程下载功能和复杂的任务自动切换功能`
-+ 该工具具有以下特点: - - 通过命令控制下载 - - 可在广播中接收任务的各种下载状态 +Aria,致力于让下载傻瓜化
++ Aria有以下特点: + - 简单 + - 可自定义是否使用广播 + - 支持多线程、多任务下载 - 支持任务自动切换 - 支持下载速度直接获取 -如果你觉得我的代码对你有帮助,您的star和issues将是对我最大支持.`^_^` +[Aria怎样使用?](#使用) -#下载 -[![Download](https://api.bintray.com/packages/arialyy/maven/MTDownloadUtil/images/download.svg)](https://bintray.com/arialyy/maven/MTDownloadUtil/_latestVersion)
-compile 'com.arialyy.downloadutil:DownloadUtil:2.1.1' +如果你觉得Aria对你有帮助,您的star和issues将是对我最大支持.`^_^` +## 下载 +[![Download](https://api.bintray.com/packages/arialyy/maven/Aria/images/download.svg)](https://bintray.com/arialyy/maven/Aria/_latestVersion)
+compile 'com.arialyy.aria:Aria:2.3.1' -#示例 + +## 示例 ![多任务下载](https://github.com/AriaLyy/DownloadUtil/blob/v_2.0/img/download_img.gif) ![单任务下载](https://github.com/AriaLyy/DownloadUtil/blob/master/img/11.gif "") -# 性能展示 +## 性能展示 ![性能展示](https://github.com/AriaLyy/DownloadUtil/blob/v_2.0/img/performance.png) -# 使用 -* 一、在Application注册下载器 +*** +## 使用 +### 一、Aria 是实体驱动型的工具,所以,第一步,你需要创建一个下载实体 +```java + DownloadEntity mEntity = new DownloadEntity(); + mEntity.setFileName(fileName); //设置文件名 + mEntity.setDownloadUrl(downloadUrl); //设置下载链接 + mEntity.setDownloadPath(downloadPath); //设置存放路径 +``` +### 二、为了能接收到Aria传递的数据,你需要把你的Activity或fragment注册到Aria管理器中,注册的方式很简单,在onResume ```java -public class BaseApplication extends Application { - @Override public void onCreate() { - super.onCreate(); - //注册下载器 - DownloadManager.init(this); +@Override protected void onResume() { + super.onResume(); + Aria.whit(this).addSchedulerListener(new MySchedulerListener()); } -} ``` - -* 二、创建广播接收器,用来接收下载的各种状态 +### 三、还记得上面的DownloadEntity吗?现在是时候使用它进行下载了 +- 启动下载 + ```java + Aria.whit(this).load(mEntity).start(); + ``` +- 暂停下载 + ```java + Aria.whit(this).load(mEntity).stop(); + ``` +- 恢复下载 + ```java + Aria.whit(this).load(mEntity).resume(); + ``` +- 取消下载 + ```java + Aria.whit(this).load(mEntity).cancel(); + ``` + +### 四、关于Aria,你还需要知道的一些东西 +- 设置下载任务数,Aria默认下载任务为**2** + ```java + Aria.get(getContext()).setMaxDownloadNum(num); + ``` +- 停止所有下载 + ```java + Aria.get(this).stopAllTask(); + ``` +- 设置失败重试次数,从事次数不能少于 1 + ```java + Aria.get(this).setReTryNum(10); + ``` +- 设置失败重试间隔,重试间隔不能小于 5000ms + ```java + Aria.get(this).setReTryInterval(5000); + ``` +- 设置是否打开广播,如果你需要在Service后台获取下载完成情况,那么你需要打开Aria广播发送按钮,[Aria广播使用](#广播使用) + ```java + Aria.get(this).openBroadcast(true); + ``` + +*** +### 广播使用 +#### 一、创建广播接收器,用来接收下载的各种状态 ```java private BroadcastReceiver mReceiver = new BroadcastReceiver() { long len = 0; @@ -72,7 +121,7 @@ private BroadcastReceiver mReceiver = new BroadcastReceiver() { }; ``` -* 三、在Activity中创建广播过滤器 +#### 二、在Activity中创建广播过滤器 ```java @Override protected void onResume() { super.onResume(); @@ -90,63 +139,16 @@ private BroadcastReceiver mReceiver = new BroadcastReceiver() { registerReceiver(mReceiver, filter); } ``` - -* 四、创建下载实体 -```java - DownloadEntity entity = new DownloadEntity(); - entity.setFileName(fileName); //设置文件名 - entity.setDownloadUrl(downloadUrl); //设置下载链接 - entity.setDownloadPath(downloadPath); //设置存放路径 -``` - -* 五、通过命令控制下载(下载状态控制,或下载任务切换将自动完成)
-**!!注意:命令需要第四步的下载实体支持** - - - 获取命令工厂实例和下载管理器实例 - ```java - CmdFactory factory = CmdFactory.getInstance(); - DownloadManager manager = DownloadManager.getInstance(); - ``` - - 开始命令、恢复下载命令都是同一个 - ```java - private void start() { - List commands = new ArrayList<>(); - IDownloadCmd addCMD = factory.createCmd(this, entity, CmdFactory.TASK_CREATE); - IDownloadCmd startCmd = factory.createCmd(this, entity, CmdFactory.TASK_START); - commands.add(addCMD); - commands.add(startCmd); - manager.setCmds(commands).exe(); - } - ``` - - 停止命令 - ```java - private void stop() { - IDownloadCmd stopCmd = factory.createCmd(this, entity, CmdFactory.TASK_STOP); - manager.setCmd(stopCmd).exe(); - } - ``` - - 取消命令(取消下载、删除下载任务) - ```java - private void cancel() { - IDownloadCmd cancelCmd = factory.createCmd(this, entity, CmdFactory.TASK_CANCEL); - manager.setCmd(cancelCmd).exe(); - } - ``` - -# 修改最大任务数 -``` -mManager.getTaskQueue().setDownloadNum(num); - -``` - -# 开发日志 +*** +## 开发日志 + v_2.1.0 修复大量bug + v_2.1.1 增加,选择最大下载任务数接口 + + v_2.3.1 重命名为Aria,下载流程简化 License ------- - Copyright 2016 AriaLyy(DownloadUtil) + Copyright 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. diff --git a/app/src/main/java/com/arialyy/simple/activity/MainActivity.java b/app/src/main/java/com/arialyy/simple/activity/MainActivity.java index f73c6eed..f0b71af9 100644 --- a/app/src/main/java/com/arialyy/simple/activity/MainActivity.java +++ b/app/src/main/java/com/arialyy/simple/activity/MainActivity.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/app/src/main/java/com/arialyy/simple/activity/MultiTaskActivity.java b/app/src/main/java/com/arialyy/simple/activity/MultiTaskActivity.java index 98e57a11..4e61682a 100644 --- a/app/src/main/java/com/arialyy/simple/activity/MultiTaskActivity.java +++ b/app/src/main/java/com/arialyy/simple/activity/MultiTaskActivity.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. @@ -104,8 +104,15 @@ public class MultiTaskActivity extends BaseActivity { //}; public void onClick(View view){ - DownloadNumDialog dialog = new DownloadNumDialog(this); - dialog.show(getSupportFragmentManager(), "download_num"); + switch (view.getId()){ + case R.id.num: + DownloadNumDialog dialog = new DownloadNumDialog(this); + dialog.show(getSupportFragmentManager(), "download_num"); + break; + case R.id.stop_all: + Aria.get(this).stopAllTask(); + break; + } } @Override protected void onResume() { diff --git a/app/src/main/java/com/arialyy/simple/activity/SingleTaskActivity.java b/app/src/main/java/com/arialyy/simple/activity/SingleTaskActivity.java index 643335df..e1ba249c 100644 --- a/app/src/main/java/com/arialyy/simple/activity/SingleTaskActivity.java +++ b/app/src/main/java/com/arialyy/simple/activity/SingleTaskActivity.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. @@ -17,6 +17,8 @@ package com.arialyy.simple.activity; import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; import android.os.Bundle; import android.os.Environment; import android.os.Handler; @@ -30,12 +32,15 @@ import butterknife.Bind; import com.arialyy.aria.core.AMTarget; import com.arialyy.aria.core.Aria; import com.arialyy.aria.core.DownloadEntity; +import com.arialyy.aria.core.DownloadManager; import com.arialyy.aria.core.task.Task; import com.arialyy.aria.orm.DbEntity; import com.arialyy.aria.util.CommonUtil; +import com.arialyy.frame.util.show.L; import com.arialyy.simple.R; import com.arialyy.simple.base.BaseActivity; import com.arialyy.simple.databinding.ActivitySingleBinding; +import com.arialyy.simple.module.DownloadModule; import com.arialyy.simple.widget.HorizontalProgressBarWithNumber; public class SingleTaskActivity extends BaseActivity { @@ -56,7 +61,14 @@ public class SingleTaskActivity extends BaseActivity { @Bind(R.id.toolbar) Toolbar toolbar; @Bind(R.id.speed) TextView mSpeed; private DownloadEntity mEntity; - private BroadcastReceiver mReceiver; + private BroadcastReceiver mReceiver = new BroadcastReceiver() { + @Override public void onReceive(Context context, Intent intent) { + String action = intent.getAction(); + if (action.equals(DownloadManager.ACTION_START)) { + L.d("START"); + } + } + }; private Handler mUpdateHandler = new Handler() { @Override public void handleMessage(Message msg) { @@ -126,10 +138,12 @@ public class SingleTaskActivity extends BaseActivity { @Override protected void onResume() { super.onResume(); Aria.whit(this).addSchedulerListener(new MySchedulerListener()); + //registerReceiver(mReceiver, getModule(DownloadModule.class).getDownloadFilter()); } @Override protected void onDestroy() { super.onDestroy(); + //unregisterReceiver(mReceiver); } @Override protected int setLayoutId() { @@ -141,11 +155,11 @@ public class SingleTaskActivity extends BaseActivity { setSupportActionBar(toolbar); toolbar.setTitle("单任务下载"); init(); + Aria.get(this).openBroadcast(true); } private void init() { - mEntity = DbEntity.findData(DownloadEntity.class, new String[] { "downloadUrl" }, - new String[] { DOWNLOAD_URL }); + mEntity = Aria.get(this).getDownloadEntity(DOWNLOAD_URL); if (mEntity != null) { mPb.setProgress((int) ((mEntity.getCurrentProgress() * 100) / mEntity.getFileSize())); mSize.setText(CommonUtil.formatFileSize(mEntity.getFileSize())); diff --git a/app/src/main/java/com/arialyy/simple/adapter/DownloadAdapter.java b/app/src/main/java/com/arialyy/simple/adapter/DownloadAdapter.java index d13baa83..f1138402 100644 --- a/app/src/main/java/com/arialyy/simple/adapter/DownloadAdapter.java +++ b/app/src/main/java/com/arialyy/simple/adapter/DownloadAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/app/src/main/java/com/arialyy/simple/base/BaseActivity.java b/app/src/main/java/com/arialyy/simple/base/BaseActivity.java index 57529a07..daa4b785 100644 --- a/app/src/main/java/com/arialyy/simple/base/BaseActivity.java +++ b/app/src/main/java/com/arialyy/simple/base/BaseActivity.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/app/src/main/java/com/arialyy/simple/base/BaseApplication.java b/app/src/main/java/com/arialyy/simple/base/BaseApplication.java index dcc09579..39f4aea0 100644 --- a/app/src/main/java/com/arialyy/simple/base/BaseApplication.java +++ b/app/src/main/java/com/arialyy/simple/base/BaseApplication.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/app/src/main/java/com/arialyy/simple/base/BaseDialog.java b/app/src/main/java/com/arialyy/simple/base/BaseDialog.java index 50d55b5a..2cc995e6 100644 --- a/app/src/main/java/com/arialyy/simple/base/BaseDialog.java +++ b/app/src/main/java/com/arialyy/simple/base/BaseDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/app/src/main/java/com/arialyy/simple/base/BaseModule.java b/app/src/main/java/com/arialyy/simple/base/BaseModule.java index 940cecdc..5806c72d 100644 --- a/app/src/main/java/com/arialyy/simple/base/BaseModule.java +++ b/app/src/main/java/com/arialyy/simple/base/BaseModule.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/app/src/main/java/com/arialyy/simple/dialog/DownloadNumDialog.java b/app/src/main/java/com/arialyy/simple/dialog/DownloadNumDialog.java index e4d34269..0d6020d7 100644 --- a/app/src/main/java/com/arialyy/simple/dialog/DownloadNumDialog.java +++ b/app/src/main/java/com/arialyy/simple/dialog/DownloadNumDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/app/src/main/java/com/arialyy/simple/module/DownloadModule.java b/app/src/main/java/com/arialyy/simple/module/DownloadModule.java index 48fffd6b..9b4d6470 100644 --- a/app/src/main/java/com/arialyy/simple/module/DownloadModule.java +++ b/app/src/main/java/com/arialyy/simple/module/DownloadModule.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. @@ -22,6 +22,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.os.Environment; import android.os.Handler; +import com.arialyy.aria.core.Aria; import com.arialyy.aria.core.DownloadEntity; import com.arialyy.aria.core.DownloadManager; import com.arialyy.aria.util.CommonUtil; @@ -50,9 +51,7 @@ public class DownloadModule extends BaseModule { String[] urls = getContext().getResources().getStringArray(R.array.test_apk_download_url); List list = new ArrayList<>(); for (String url : urls) { - DownloadEntity entity = - DownloadEntity.findData(DownloadEntity.class, new String[] { "downloadUrl" }, - new String[] { url }); + DownloadEntity entity = Aria.get(getContext()).getDownloadEntity(url); if (entity == null) { entity = createDownloadEntity(url); } @@ -93,7 +92,6 @@ public class DownloadModule extends BaseModule { entity.setDownloadPath(getDownloadPath(url)); entity.setFileName(fileName); //entity.setFileName("taskName_________" + i); - entity.save(); return entity; } diff --git a/app/src/main/java/com/arialyy/simple/widget/HorizontalProgressBarWithNumber.java b/app/src/main/java/com/arialyy/simple/widget/HorizontalProgressBarWithNumber.java index 6ea5eee5..0e8512a0 100644 --- a/app/src/main/java/com/arialyy/simple/widget/HorizontalProgressBarWithNumber.java +++ b/app/src/main/java/com/arialyy/simple/widget/HorizontalProgressBarWithNumber.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 AriaLyy(DownloadUtil) + * 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. diff --git a/app/src/main/res/layout/activity_multi.xml b/app/src/main/res/layout/activity_multi.xml index ef85f1b1..0414246c 100644 --- a/app/src/main/res/layout/activity_multi.xml +++ b/app/src/main/res/layout/activity_multi.xml @@ -19,15 +19,26 @@ />