|
@@ -5,8 +5,6 @@ import android.content.Intent;
|
|
|
import android.os.Build;
|
|
import android.os.Build;
|
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
|
import android.support.annotation.RequiresApi;
|
|
import android.support.annotation.RequiresApi;
|
|
|
-import android.support.v7.widget.LinearLayoutManager;
|
|
|
|
|
-import android.support.v7.widget.RecyclerView;
|
|
|
|
|
import android.text.Html;
|
|
import android.text.Html;
|
|
|
import android.text.TextUtils;
|
|
import android.text.TextUtils;
|
|
|
import android.view.View;
|
|
import android.view.View;
|
|
@@ -20,7 +18,6 @@ import android.widget.RelativeLayout;
|
|
|
import android.widget.TextView;
|
|
import android.widget.TextView;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.arialyy.annotations.Download;
|
|
import com.arialyy.annotations.Download;
|
|
|
import com.arialyy.aria.core.Aria;
|
|
import com.arialyy.aria.core.Aria;
|
|
@@ -29,14 +26,11 @@ import com.arialyy.aria.core.download.DownloadTask;
|
|
|
import com.arialyy.aria.core.inf.IEntity;
|
|
import com.arialyy.aria.core.inf.IEntity;
|
|
|
import com.bumptech.glide.Glide;
|
|
import com.bumptech.glide.Glide;
|
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
|
-import com.kfzs.duanduan.KFZSApp;
|
|
|
|
|
-import com.kfzs.duanduan.datashare.DDProviderHelper;
|
|
|
|
|
import com.kfzs.duanduan.datashare.provider.download.DownLoadInfo;
|
|
import com.kfzs.duanduan.datashare.provider.download.DownLoadInfo;
|
|
|
import com.kfzs.duanduan.event.BigEvent;
|
|
import com.kfzs.duanduan.event.BigEvent;
|
|
|
import com.kfzs.duanduan.event.EventTypes;
|
|
import com.kfzs.duanduan.event.EventTypes;
|
|
|
import com.kfzs.duanduan.services.DownloadTaskService;
|
|
import com.kfzs.duanduan.services.DownloadTaskService;
|
|
|
import com.kfzs.duanduan.utils.ApkUtils;
|
|
import com.kfzs.duanduan.utils.ApkUtils;
|
|
|
-import com.kfzs.duanduan.utils.dlg.SkipUtils;
|
|
|
|
|
import com.sheep.gamegroup.absBase.AbsChooseImageActivity;
|
|
import com.sheep.gamegroup.absBase.AbsChooseImageActivity;
|
|
|
import com.sheep.gamegroup.di.components.DaggerTaskDetailComponent;
|
|
import com.sheep.gamegroup.di.components.DaggerTaskDetailComponent;
|
|
|
import com.sheep.gamegroup.di.modules.TaskDetailModule;
|
|
import com.sheep.gamegroup.di.modules.TaskDetailModule;
|
|
@@ -49,7 +43,6 @@ import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
|
|
|
import com.sheep.gamegroup.model.entity.TaskChild;
|
|
import com.sheep.gamegroup.model.entity.TaskChild;
|
|
|
import com.sheep.gamegroup.model.entity.TaskDescEntity;
|
|
import com.sheep.gamegroup.model.entity.TaskDescEntity;
|
|
|
import com.sheep.gamegroup.model.entity.TaskEty;
|
|
import com.sheep.gamegroup.model.entity.TaskEty;
|
|
|
-import com.sheep.gamegroup.model.entity.TaskListen;
|
|
|
|
|
import com.sheep.gamegroup.model.entity.TaskReleaseEty;
|
|
import com.sheep.gamegroup.model.entity.TaskReleaseEty;
|
|
|
import com.sheep.gamegroup.model.util.AutoTaskListUtil;
|
|
import com.sheep.gamegroup.model.util.AutoTaskListUtil;
|
|
|
import com.sheep.gamegroup.model.util.EntityUtils;
|
|
import com.sheep.gamegroup.model.util.EntityUtils;
|
|
@@ -69,11 +62,9 @@ import com.sheep.gamegroup.util.UMConfigUtils;
|
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
|
import com.sheep.gamegroup.view.adapter.AdpTaskDetailChildListview;
|
|
import com.sheep.gamegroup.view.adapter.AdpTaskDetailChildListview;
|
|
|
import com.sheep.gamegroup.view.adapter.TaskdetailSonListviewAdp;
|
|
import com.sheep.gamegroup.view.adapter.TaskdetailSonListviewAdp;
|
|
|
-import com.sheep.gamegroup.view.adapter.TaskdetailSonRecycleViewAdp;
|
|
|
|
|
import com.sheep.jiuyan.samllsheep.BuildConfig;
|
|
import com.sheep.jiuyan.samllsheep.BuildConfig;
|
|
|
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.utils.ClassFileHelper;
|
|
|
|
|
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 com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
@@ -81,7 +72,6 @@ import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
|
|
|
|
|
|
|
|
import org.greenrobot.eventbus.EventBus;
|
|
import org.greenrobot.eventbus.EventBus;
|
|
|
|
|
|
|
|
-import java.io.File;
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Locale;
|
|
import java.util.Locale;
|
|
@@ -96,8 +86,6 @@ import rx.android.schedulers.AndroidSchedulers;
|
|
|
import rx.functions.Action1;
|
|
import rx.functions.Action1;
|
|
|
import rx.schedulers.Schedulers;
|
|
import rx.schedulers.Schedulers;
|
|
|
|
|
|
|
|
-import static com.sheep.jiuyan.samllsheep.utils.ClassFileHelper.DIR;
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 任务详情页面
|
|
* 任务详情页面
|
|
|
* Created by ljy on 2018/4/2.
|
|
* Created by ljy on 2018/4/2.
|
|
@@ -544,7 +532,7 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
break;
|
|
break;
|
|
|
case DownloadTaskService.STATUS_INIT://开始下载
|
|
case DownloadTaskService.STATUS_INIT://开始下载
|
|
|
|
|
|
|
|
- DownloadTarget task = null;
|
|
|
|
|
|
|
+ DownloadTarget task;
|
|
|
if (TextUtils.isEmpty(taskReleaseEty.getTask().getDownload_link()) || !taskReleaseEty.getTask().getDownload_link().contains("http")) {
|
|
if (TextUtils.isEmpty(taskReleaseEty.getTask().getDownload_link()) || !taskReleaseEty.getTask().getDownload_link().contains("http")) {
|
|
|
G.showToast(R.string.error_download_link);
|
|
G.showToast(R.string.error_download_link);
|
|
|
return;
|
|
return;
|
|
@@ -591,7 +579,7 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
case R.id.btn_up_imag:
|
|
case R.id.btn_up_imag:
|
|
|
if(type == 101){
|
|
if(type == 101){
|
|
|
if(game_id > 0){
|
|
if(game_id > 0){
|
|
|
- ViewUtil.showGamePayAccount((Activity) activity, game_id);
|
|
|
|
|
|
|
+ ViewUtil.showGamePayAccount(activity, game_id);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
}else
|
|
}else
|
|
@@ -625,7 +613,7 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
- G.showToast(BuildConfig.DEBUG ? e.getMessage() : getString(R.string.loading_data));
|
|
|
|
|
|
|
+ G.showToast(e.getMessage());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1056,42 +1044,40 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
|
|
|
|
|
|
|
|
//自动审核
|
|
//自动审核
|
|
|
//todo 暂时不要
|
|
//todo 暂时不要
|
|
|
- if(false && taskEty.getInspect_type() == 3){
|
|
|
|
|
- taskdetail_user_use_layout.setVisibility(View.VISIBLE);
|
|
|
|
|
-
|
|
|
|
|
- start_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
- start_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
- down_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
- down_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
- install_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
- install_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
- if (taskEty != null) {
|
|
|
|
|
- int thisRun = taskEty.getRunTask();
|
|
|
|
|
- if (thisRun == 1) {//接受了任务
|
|
|
|
|
- start_task_btntv.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
- start_task_line.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
- if (PackageUtil.isAppInstalled(SheepApp.mContext, taskEty.getPackage_names())) {
|
|
|
|
|
- down_task_btntv.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
- down_task_line.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
- install_task_btntv.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
- install_task_line.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
- } else if(!TextUtils.isEmpty(PackageUtil.isExistsFile(taskEty.getPackage_names()))){
|
|
|
|
|
-
|
|
|
|
|
- down_task_btntv.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
- down_task_line.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
- install_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
- install_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
- } else {
|
|
|
|
|
- down_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
- down_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
- install_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
- install_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if(taskEty.getInspect_type() == 3){
|
|
|
|
|
+// taskdetail_user_use_layout.setVisibility(View.VISIBLE);
|
|
|
|
|
+//
|
|
|
|
|
+// start_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+// start_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+// down_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+// down_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+// install_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+// install_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+// if (taskEty != null) {
|
|
|
|
|
+// int thisRun = taskEty.getRunTask();
|
|
|
|
|
+// if (thisRun == 1) {//接受了任务
|
|
|
|
|
+// start_task_btntv.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+// start_task_line.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+// if (PackageUtil.isAppInstalled(SheepApp.mContext, taskEty.getPackage_names())) {
|
|
|
|
|
+// down_task_btntv.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+// down_task_line.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+// install_task_btntv.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+// install_task_line.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+// } else if(!TextUtils.isEmpty(PackageUtil.isExistsFile(taskEty.getPackage_names()))){
|
|
|
|
|
+//
|
|
|
|
|
+// down_task_btntv.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+// down_task_line.setBackground(getResources().getDrawable(R.drawable.selector_button_full_main));
|
|
|
|
|
+// install_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+// install_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+// } else {
|
|
|
|
|
+// down_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+// down_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+// install_task_btntv.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+// install_task_line.setBackground(getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
//截至时间
|
|
//截至时间
|
|
|
if(taskReleaseEty != null && taskReleaseEty.isIs_running() && taskReleaseEty.getDemo_time() > 0){
|
|
if(taskReleaseEty != null && taskReleaseEty.isIs_running() && taskReleaseEty.getDemo_time() > 0){
|