From c01c53d7175d00a971ccd6fbcdb893a6289fea9a Mon Sep 17 00:00:00 2001 From: laoyuyu <511455842@qq.com> Date: Tue, 20 Nov 2018 21:33:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA=E7=A9=BA?= =?UTF-8?q?=E6=8C=87=E9=92=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/arialyy/aria/core/command/normal/CancelAllCmd.java | 5 +++++ app/src/main/AndroidManifest.xml | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Aria/src/main/java/com/arialyy/aria/core/command/normal/CancelAllCmd.java b/Aria/src/main/java/com/arialyy/aria/core/command/normal/CancelAllCmd.java index 9c4181a5..dd47032e 100644 --- a/Aria/src/main/java/com/arialyy/aria/core/command/normal/CancelAllCmd.java +++ b/Aria/src/main/java/com/arialyy/aria/core/command/normal/CancelAllCmd.java @@ -28,6 +28,7 @@ import com.arialyy.aria.core.queue.UploadTaskQueue; import com.arialyy.aria.core.upload.UploadEntity; import com.arialyy.aria.core.upload.UploadTaskEntity; import com.arialyy.aria.orm.DbEntity; +import com.arialyy.aria.util.ALog; import java.util.List; /** @@ -99,6 +100,10 @@ public class CancelAllCmd extends AbsNormalCmd { } private void remove(AbsTaskEntity te) { + if (te == null){ + ALog.w(TAG, "取消任务失败,任务为空"); + return; + } if (te instanceof DownloadTaskEntity) { mQueue = DownloadTaskQueue.getInstance(); } else if (te instanceof UploadTaskEntity) { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cbae1869..adab4328 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -16,10 +16,9 @@ -