Преглед на файлове

使用老版本aria下载很慢,修改回去

zengjiebin преди 7 години
родител
ревизия
8bf8e27c84

+ 0 - 2
.idea/gradle.xml

@@ -8,8 +8,6 @@
         <option name="modules">
           <set>
             <option value="$PROJECT_DIR$" />
-            <option value="$PROJECT_DIR$/Aria" />
-            <option value="$PROJECT_DIR$/AriaAnnotations" />
             <option value="$PROJECT_DIR$/app" />
             <option value="$PROJECT_DIR$/datashare" />
             <option value="$PROJECT_DIR$/ucrop" />

+ 5 - 5
app/build.gradle

@@ -247,12 +247,12 @@ dependencies {
 
     //    compile 'com.google.zxing:core:3.3.0'
     compile project(':ucrop')
-//    compile('com.arialyy.aria:aria-core:3.5') {
-//        exclude group: 'com.android.support'
-//    }
-    compile project(':Aria')
+    compile('com.arialyy.aria:aria-core:3.3.16') {
+        exclude group: 'com.android.support'
+    }
+//    compile project(':Aria')
 
-    annotationProcessor 'com.arialyy.aria:aria-compiler:3.2.14'
+    annotationProcessor 'com.arialyy.aria:aria-compiler:3.3.16'
     compile 'com.sunfusheng:marqueeview:1.3.3'
     compile files('libs/alipaySdk-20170922.jar')
     //极光

+ 1 - 2
app/src/main/java/com/sheep/gamegroup/util/DownloadUtil.java

@@ -383,8 +383,7 @@ public class DownloadUtil {
         if(TextUtils.isEmpty(downLoadInfo.getMPackageName())){
             filePath = DIR+ File.separator+downLoadInfo.getMGameName()+ ClassFileHelper.FILE_SUFFIX;
         }
-//        task.setFilePath(filePath).start();
-        task.setDownloadPath(filePath).start();
+        task.setFilePath(filePath).start();
     }
 
     public void pause(DownLoadInfo downLoadInfo) {

+ 8 - 8
app/src/main/java/com/sheep/jiuyan/samllsheep/service/DownloadService.java

@@ -34,23 +34,23 @@ public class DownloadService extends Service{
     }
 
     @Download.onPre void onPre(DownloadTask task) {
-        LogUtil.println("DownloadService", "onPre", task.getKey());//, task.getTaskName());
+        LogUtil.println("DownloadService", "onPre", task.getKey(), task.getTaskName());
     }
     @Download.onTaskStart void taskStart(DownloadTask task) {
-        LogUtil.println("DownloadService", "taskStart", task.getKey());//, task.getTaskName());
+        LogUtil.println("DownloadService", "taskStart", task.getKey(), task.getTaskName());
     }
     @Download.onTaskResume void taskResume(DownloadTask task) {
-        LogUtil.println("DownloadService", "taskResume", task.getKey());//, task.getTaskName());
+        LogUtil.println("DownloadService", "taskResume", task.getKey(), task.getTaskName());
     }
     //在这里处理任务执行中的状态,如进度进度条的刷新
     @Download.onTaskRunning protected void running(DownloadTask task) {
-        LogUtil.println("DownloadService", "running", task.getKey(), /*task.getTaskName(),*/ task.getPercent());
+        LogUtil.println("DownloadService", "running", task.getKey(), task.getTaskName(), task.getPercent());
         mDownloadTaskService.setDownloadTaskPercent(task.getPercent(), task.getCurrentProgress()/1024d/1024d,task.getFileSize()/1024d/1024d,0,task.getKey());
         EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.GENERATION_ACCOUNT_REFRESH_ADAPTER).setData(task));
     }
 
     @Download.onTaskStop void taskStop(DownloadTask task) {
-        LogUtil.println("DownloadService", "taskStop", task.getKey());//, task.getTaskName());
+        LogUtil.println("DownloadService", "taskStop", task.getKey(), task.getTaskName());
         mDownloadTaskService.setDownloadTaskStatus(task.getKey(), DownloadUtil.STATUS_PAUSE);
         EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.DOWNLOAD_STOP).setData(task));
     }
@@ -59,13 +59,13 @@ public class DownloadService extends Service{
     }
 
     @Download.onTaskCancel void taskCancel(DownloadTask task) {
-        LogUtil.println("DownloadService", "taskCancel", task.getKey());//, task.getTaskName());
+        LogUtil.println("DownloadService", "taskCancel", task.getKey(), task.getTaskName());
         mDownloadTaskService.deleteDownloadTaskByDownloadUrl(task.getKey());
         EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.DOWNLOAD_CANCEL).setData(task));
     }
 
     @Download.onTaskFail void taskFail(DownloadTask task) {
-        LogUtil.println("DownloadService", "taskFail", task.getKey());//, task.getTaskName());
+        LogUtil.println("DownloadService", "taskFail", task.getKey(), task.getTaskName());
         mDownloadTaskService.setDownloadTaskStatus(task.getKey(), DownloadUtil.STATUS_FAIL);
         EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.DOWNLOAD_FAIL).setData(task));
         //空间不足,弹框提示
@@ -79,7 +79,7 @@ public class DownloadService extends Service{
     }
 
     @Download.onTaskComplete void taskComplete(DownloadTask task) {
-        LogUtil.println("DownloadService", "taskComplete", task.getKey());//, task.getTaskName());
+        LogUtil.println("DownloadService", "taskComplete", task.getKey(), task.getTaskName());
         mDownloadTaskService.setDownloadTaskFinish(task.getKey(), task.getDownloadPath());
         ApkUtils.installApk(getApplicationContext(), task.getDownloadPath());
         EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.DOWNLOAD_COMPLETE).setData(task));

+ 0 - 9
build.gradle

@@ -48,15 +48,6 @@ task clean(type: Delete) {
 
 
 ext {
-    //aria使用本地library时添加的
-    userOrg = 'arialyy'
-    groupId = 'com.arialyy.aria'
-    publishVersion = '3.2.14'
-    //  publishVersion = '1.0.3'  //FTP插件
-    repoName='maven'
-    desc = 'android 下载框架'
-    website = 'https://github.com/AriaLyy/Aria'
-    licences = ['Apache-2.0']
 
     android = [
             compileSdkVersion: 27,

+ 1 - 1
settings.gradle

@@ -1 +1 @@
-include ':app', ':datashare', ':view', ':ucrop', ':Aria', ':AriaAnnotations'
+include ':app', ':datashare', ':view', ':ucrop'//, ':Aria', ':AriaAnnotations'