Commit 376cf367 authored by mengcuiguang's avatar mengcuiguang

修改cpd任务下载取消弹窗时 停止任务队列、清除缓存

parent 576f7f1a
...@@ -199,6 +199,7 @@ public class VideoAdingManager { ...@@ -199,6 +199,7 @@ public class VideoAdingManager {
/** /**
* 根据广告优先级获取下一个 * 根据广告优先级获取下一个
* 穿山甲->优量汇->穿山甲全屏->快手->珊瑚->闪电盒子->枫岚(兜底)
*/ */
private String getNextAdType() { private String getNextAdType() {
String nextAdType; String nextAdType;
...@@ -284,23 +285,22 @@ public class VideoAdingManager { ...@@ -284,23 +285,22 @@ public class VideoAdingManager {
weight = weight + ksVideoWeight; weight = weight + ksVideoWeight;
LogUtil.d(TAG, "权重值:ksWeight:" + ksVideoWeight); LogUtil.d(TAG, "权重值:ksWeight:" + ksVideoWeight);
} }
if (AppConfig.flVideoAdCount > 0) { if (AppConfig.shVideoAdCount > 0) {
weightList.add(new WeightBean(flVideoWeight, Constant.FL_VEDIO_AD)); weightList.add(new WeightBean(shVideoWeight, Constant.SH_VEDIO_AD));
weight = weight + flVideoWeight; weight = weight + shVideoWeight;
LogUtil.d(TAG, "权重值:flVideoWeight:" + flVideoWeight); LogUtil.d(TAG, "权重值:shWeight:" + shVideoWeight);
} }
if (AppConfig.wnVideoAdCount > 0) { if (AppConfig.wnVideoAdCount > 0) {
weightList.add(new WeightBean(wnWeight, Constant.SDHZ_VEDIO_AD)); weightList.add(new WeightBean(wnWeight, Constant.SDHZ_VEDIO_AD));
weight = weight + wnWeight; weight = weight + wnWeight;
LogUtil.d(TAG, "权重值:sdhzWeight:" + wnWeight); LogUtil.d(TAG, "权重值:sdhzWeight:" + wnWeight);
} }
if (AppConfig.shVideoAdCount > 0) { if (AppConfig.flVideoAdCount > 0) {
weightList.add(new WeightBean(shVideoWeight, Constant.SH_VEDIO_AD)); weightList.add(new WeightBean(flVideoWeight, Constant.FL_VEDIO_AD));
weight = weight + shVideoWeight; weight = weight + flVideoWeight;
LogUtil.d(TAG, "权重值:shWeight:" + shVideoWeight); LogUtil.d(TAG, "权重值:flVideoWeight:" + flVideoWeight);
} }
// 权重随机 // 权重随机
if (weightList != null && weightList.size() > 0 && weight > 0) { if (weightList != null && weightList.size() > 0 && weight > 0) {
LogUtil.d(TAG, "1、权重总值:" + weight); LogUtil.d(TAG, "1、权重总值:" + weight);
......
...@@ -3,12 +3,14 @@ package com.mints.goodmoney.ad.video; ...@@ -3,12 +3,14 @@ package com.mints.goodmoney.ad.video;
import android.app.Activity; import android.app.Activity;
import android.os.SystemClock; import android.os.SystemClock;
import com.mints.goodmoney.MintsApplication;
import com.mints.goodmoney.common.AppConfig; import com.mints.goodmoney.common.AppConfig;
import com.mints.goodmoney.common.Constant; import com.mints.goodmoney.common.Constant;
import com.mints.goodmoney.manager.TrackManager; import com.mints.goodmoney.manager.TrackManager;
import com.mints.goodmoney.manager.YlhAdManager; import com.mints.goodmoney.manager.YlhAdManager;
import com.mints.goodmoney.mvp.views.VideoAdManagerView; import com.mints.goodmoney.mvp.views.VideoAdManagerView;
import com.mints.goodmoney.utils.LogUtil; import com.mints.goodmoney.utils.LogUtil;
import com.mints.goodmoney.utils.ToastUtil;
import com.qq.e.ads.rewardvideo.RewardVideoAD; import com.qq.e.ads.rewardvideo.RewardVideoAD;
import com.qq.e.ads.rewardvideo.RewardVideoADListener; import com.qq.e.ads.rewardvideo.RewardVideoADListener;
import com.qq.e.comm.util.AdError; import com.qq.e.comm.util.AdError;
...@@ -126,7 +128,7 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView ...@@ -126,7 +128,7 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView
ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_MOREDIALOG_POSTID(); ylhPostId = YlhAdManager.INSTANCE.getYLH_AD_VEDIO_MOREDIALOG_POSTID();
break; break;
} }
// ToastUtil.show(MintsApplication.getContext(), "ylh vedio:" + ylhPostId); ToastUtil.show(MintsApplication.getContext(), "ylh vedio:" + ylhPostId);
if (rewardVideoAD != null) { if (rewardVideoAD != null) {
rewardVideoAD = null; rewardVideoAD = null;
} }
......
...@@ -8,8 +8,10 @@ import android.view.View ...@@ -8,8 +8,10 @@ import android.view.View
import android.view.WindowManager import android.view.WindowManager
import android.widget.ImageView import android.widget.ImageView
import android.widget.TextView import android.widget.TextView
import com.downloader.PRDownloader
import com.downloader.Progress import com.downloader.Progress
import com.mints.goodmoney.R import com.mints.goodmoney.R
import com.mints.goodmoney.utils.CacheUtil
import com.mints.goodmoney.utils.Utils import com.mints.goodmoney.utils.Utils
import com.mints.library.utils.nodoubleclick.AntiShake import com.mints.library.utils.nodoubleclick.AntiShake
...@@ -46,6 +48,9 @@ class DownloadProgressDialog(context: Context) : ...@@ -46,6 +48,9 @@ class DownloadProgressDialog(context: Context) :
when (v.id) { when (v.id) {
R.id.iv_download_quit -> { R.id.iv_download_quit -> {
dismiss() dismiss()
PRDownloader.cancelAll()
CacheUtil.clearAllCache(context)
} }
} }
} }
......
...@@ -108,7 +108,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall ...@@ -108,7 +108,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
if (ylhIntent == null) { if (ylhIntent == null) {
// 优量汇广告 // 优量汇广告
ylhIntent = new Intent(activity, SplashKsADActivity.class); ylhIntent = new Intent(activity, SplashADActivity.class);
} }
activity.startActivity(ylhIntent); activity.startActivity(ylhIntent);
} else { } else {
...@@ -116,7 +116,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall ...@@ -116,7 +116,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
if (ksIntent == null) { if (ksIntent == null) {
// 快手广告 // 快手广告
ksIntent = new Intent(activity, SplashADActivity.class); ksIntent = new Intent(activity, SplashKsADActivity.class);
} }
activity.startActivity(ksIntent); activity.startActivity(ksIntent);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment