version:3.4.8
fix: update:修改主页ui
This commit is contained in:
1 parent
b8b951650b
commit
d62f7ea042
91 files changed
+8580
-1279
No files matched your search
@@ -17,12 +17,12 @@ import com.arialyy.annotations.Download;
|
||||
import com.arialyy.aria.core.Aria;
|
||||
import com.arialyy.aria.core.task.DownloadTask;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.fuying.sn.KeepAliveConnection;
|
||||
import com.fuying.sn.R;
|
||||
import com.fuying.sn.gson.GsonUtils;
|
||||
import com.fuying.sn.service.main.MainService;
|
||||
import com.fuying.sn.utils.ApkUtils;
|
||||
import com.fuying.sn.gson.GsonUtils;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@@ -30,6 +30,15 @@ import java.io.File;
|
||||
public class DownloadService extends Service {
|
||||
private static final String TAG = "DownloadService";
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
Log.e(TAG, "onCreate: ");
|
||||
Aria.download(this).register();
|
||||
//恢复所有未完成的下载任务
|
||||
Aria.download(this).resumeAllTask();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
startService(new Intent(this, StepService.class));
|
||||
@@ -37,21 +46,14 @@ public class DownloadService extends Service {
|
||||
startService(new Intent(this, MainService.class));
|
||||
startService(new Intent(this, ManagerService.class));
|
||||
startService(new Intent(this, ControlPanelService.class));
|
||||
Aria.download(this).register();
|
||||
//恢复所有未完成的下载任务
|
||||
Aria.download(this).resumeAllTask();
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
Log.e(TAG, "onDestroy: ");
|
||||
Aria.download(this).unRegister();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -156,6 +158,7 @@ public class DownloadService extends Service {
|
||||
}
|
||||
Log.e(TAG, "taskFail: " + packageName + "filepath: " + filepath);
|
||||
Aria.download(this).load(task.getDownloadEntity().getId()).cancel(true);
|
||||
|
||||
// Aria.download(this)
|
||||
// .load(task.getDownloadEntity().getRealUrl()) //读取下载地址
|
||||
// .setFilePath(task.getFilePath())
|
||||
|
||||
Reference in new issue
Block a user