|
@@ -2,9 +2,7 @@ package com.sheep.gamegroup.helper;
|
|
|
|
|
|
|
|
import android.app.Activity;
|
|
import android.app.Activity;
|
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
|
-import android.view.View;
|
|
|
|
|
import android.widget.TextView;
|
|
import android.widget.TextView;
|
|
|
-
|
|
|
|
|
import com.liulishuo.okdownload.DownloadTask;
|
|
import com.liulishuo.okdownload.DownloadTask;
|
|
|
import com.liulishuo.okdownload.OkDownload;
|
|
import com.liulishuo.okdownload.OkDownload;
|
|
|
import com.liulishuo.okdownload.StatusUtil;
|
|
import com.liulishuo.okdownload.StatusUtil;
|
|
@@ -15,19 +13,15 @@ import com.sheep.gamegroup.util.DownloadTextUtl;
|
|
|
import com.sheep.gamegroup.util.DownloadUtil;
|
|
import com.sheep.gamegroup.util.DownloadUtil;
|
|
|
import com.kfzs.duanduan.utils.ApkUtils;
|
|
import com.kfzs.duanduan.utils.ApkUtils;
|
|
|
import com.sheep.gamegroup.model.api.IDownload;
|
|
import com.sheep.gamegroup.model.api.IDownload;
|
|
|
-import com.sheep.gamegroup.util.Jump2View;
|
|
|
|
|
import com.sheep.gamegroup.util.LogUtil;
|
|
import com.sheep.gamegroup.util.LogUtil;
|
|
|
import com.sheep.gamegroup.util.UMConfigUtils;
|
|
import com.sheep.gamegroup.util.UMConfigUtils;
|
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
|
-import com.sheep.gamegroup.view.activity.TaskDetailAct;
|
|
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
import com.sheep.jiuyan.samllsheep.service.DownloadService;
|
|
import com.sheep.jiuyan.samllsheep.service.DownloadService;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
|
|
import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
|
|
|
-
|
|
|
|
|
import org.greenrobot.eventbus.EventBus;
|
|
import org.greenrobot.eventbus.EventBus;
|
|
|
-
|
|
|
|
|
import rx.functions.Action1;
|
|
import rx.functions.Action1;
|
|
|
|
|
|
|
|
import static com.sheep.gamegroup.model.entity.TaskEty.TASK_TYPE_APP;
|
|
import static com.sheep.gamegroup.model.entity.TaskEty.TASK_TYPE_APP;
|
|
@@ -148,13 +142,10 @@ public class DownloadHelper {
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- new Thread(new Runnable() {
|
|
|
|
|
- @Override
|
|
|
|
|
- public void run() {
|
|
|
|
|
- if (downloadUtil.addDownloadTask(downLoadInfo)) {
|
|
|
|
|
- //发送红点信息
|
|
|
|
|
- EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.TIPS_DOWN_ICON));
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ new Thread(() -> {
|
|
|
|
|
+ if (downloadUtil.addDownloadTask(downLoadInfo)) {
|
|
|
|
|
+ //发送红点信息
|
|
|
|
|
+ EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.TIPS_DOWN_ICON));
|
|
|
}
|
|
}
|
|
|
}).start();
|
|
}).start();
|
|
|
UMConfigUtils.onEvent(UMConfigUtils.Event.TASK_DOWNLOAD);
|
|
UMConfigUtils.onEvent(UMConfigUtils.Event.TASK_DOWNLOAD);
|