Commit 376cf367 authored by mengcuiguang's avatar mengcuiguang

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

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