Commit 3d682bf3 authored by jyx's avatar jyx

修改超级加倍显示规则

parent 4e5583cc
......@@ -14,6 +14,8 @@ import com.qq.e.ads.rewardvideo.RewardVideoAD;
import com.qq.e.ads.rewardvideo.RewardVideoADListener;
import com.qq.e.comm.util.AdError;
import java.lang.ref.WeakReference;
/**
* 优量汇视频
*/
......@@ -35,14 +37,15 @@ public class YlhVideoAdManager extends BaseVideoAd implements VideoAdManagerView
if (_inst != null) {
return _inst;
} else {
_inst = new YlhVideoAdManager(activity);
WeakReference<Activity> activityWeakReference = new WeakReference<>(activity);
_inst = new YlhVideoAdManager(activityWeakReference);
return _inst;
}
}
private YlhVideoAdManager(Activity activity) {
super(activity);
init(activity);
private YlhVideoAdManager(WeakReference<Activity> activity) {
super(activity.get());
init(activity.get());
}
private void init(Activity activity) {
......
......@@ -552,12 +552,14 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
}
override fun getUserTaskMsgSuc(coin: Int, riskFlag: Boolean, hideSomeodular: Boolean) {
if (carrierType == Constant.CARRIER_CHALLENGE_TURN ||
carrierType == Constant.CARRIER_CHALLENGE_CARD ||
carrierType == Constant.CARRIER_HOMEVEDIO_CHALLENGE ||
carrierType == Constant.CARRIER_SIGNIN_HOMEPAGE_AWARD) {
if (carrierType == Constant.CARRIER_CHALLENGE_TURN || // 大转盘
carrierType == Constant.CARRIER_BLESSINGBAG || // 首页福袋
carrierType == Constant.CARRIER_SMALLHOMEVEDIO || // 短视频红包
carrierType == Constant.CARRIER_HOMEVEDIO) { // 小视频红包
isSuperTask = hideSomeodular
refreshHighTask()
if (isSuperTask) {
refreshHighTask()
}
}
val sumCoin = coin.toString()
......@@ -613,68 +615,66 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
* 刷新高额任务
*/
private fun refreshHighTask() {
if (isSuperTask) {
if (mCurrentPkg == null) {
// 用户点击激励视频但并未下载安装
if ((mReceiverBroadcastReceiver != null && superTaskStatus == 0) ||
(mReceiverBroadcastReceiver == null && superTaskStatus == 4)) {
tvAwardHighContent.visibility = View.VISIBLE
tvAwardHighInfo.visibility = View.GONE
tvAwardHighInfo2.visibility = View.GONE
tvAwardHigh.visibility = View.GONE
tvAwardHighContent.text = "未完成下载安装"
} else {
tvAwardHighContent.visibility = View.VISIBLE
tvAwardHighInfo.visibility = View.VISIBLE
tvAwardHigh.visibility = View.VISIBLE
tvAwardHighInfo2.visibility = View.VISIBLE
tvAwardHighContent.text = "超级加倍即可领取3000金币,3000金币=0.3元,可立即到账"
tvAwardHighInfo.text = "下载安装打开领取3000金币"
tvAwardHighInfo2.text = "获得少量金币"
tvAwardHigh.text = "超级加倍领取"
}
if (mCurrentPkg == null) {
// 用户点击激励视频但并未下载安装
if ((mReceiverBroadcastReceiver != null && superTaskStatus == 0) ||
(mReceiverBroadcastReceiver == null && superTaskStatus == 4)) {
tvAwardHighContent.visibility = View.VISIBLE
tvAwardHighInfo.visibility = View.GONE
tvAwardHighInfo2.visibility = View.GONE
tvAwardHigh.visibility = View.GONE
tvAwardHighContent.text = "未完成下载安装"
} else {
// 用户没有开启
if (AppUtil.getTimePkgUsed(this, mCurrentPkg!!) == -1) {
superTaskStatus = 1
tvAwardHighContent.visibility = View.VISIBLE
tvAwardHighInfo.visibility = View.VISIBLE
tvAwardHigh.visibility = View.VISIBLE
tvAwardContent.text = "超级加倍 领取3000金币"
tvAwardHighContent.text = "打开APP,试玩5秒钟,提现0.3元,可立即到账"
tvAwardHighInfo.visibility = View.GONE
tvAwardHighInfo2.visibility = View.GONE
tvAwardHigh.text = "打开APP领取3000金币"
return
}
tvAwardHighContent.visibility = View.VISIBLE
tvAwardHighInfo.visibility = View.VISIBLE
tvAwardHigh.visibility = View.VISIBLE
tvAwardHighInfo2.visibility = View.VISIBLE
tvAwardHighContent.text = "超级加倍即可领取3000金币,3000金币=0.3元,可立即到账"
tvAwardHighInfo.text = "下载安装打开领取3000金币"
tvAwardHighInfo2.text = "获得少量金币"
tvAwardHigh.text = "超级加倍领取"
}
} else {
// 用户没有开启
if (AppUtil.getTimePkgUsed(this, mCurrentPkg!!) == -1) {
superTaskStatus = 1
tvAwardHighContent.visibility = View.VISIBLE
tvAwardHighInfo.visibility = View.VISIBLE
tvAwardHigh.visibility = View.VISIBLE
tvAwardContent.text = "超级加倍 领取3000金币"
tvAwardHighContent.text = "打开APP,试玩5秒钟,提现0.3元,可立即到账"
tvAwardHighInfo.visibility = View.GONE
tvAwardHighInfo2.visibility = View.GONE
tvAwardHigh.text = "打开APP领取3000金币"
return
}
// 用户开启
if (AppTryPlayManager.getTryPlayIsOK(mCurrentPkg!!, 5)) {
tvAwardHighContent.visibility = View.VISIBLE
tvAwardHighInfo.visibility = View.VISIBLE
tvAwardHigh.visibility = View.VISIBLE
superTaskStatus = 3
tvAwardContent.text = "超级加倍 领取3000金币"
tvAwardHighContent.text = "超级加倍即可领取3000金币,3000金币=0.3元,可立即到账"
tvAwardHighInfo.visibility = View.GONE
tvAwardHighInfo2.visibility = View.GONE
tvAwardHigh.text = "领取3000金币提现0.3元"
} else {
tvAwardHighContent.visibility = View.VISIBLE
tvAwardHighInfo.visibility = View.VISIBLE
tvAwardHigh.visibility = View.VISIBLE
superTaskStatus = 2
tvAwardContent.text = "超级加倍 领取3000金币"
tvAwardHighContent.text = "打开APP,试玩5秒钟,提现0.3元,可立即到账"
tvAwardHighInfo.visibility = View.GONE
tvAwardHighInfo2.visibility = View.GONE
tvAwardHigh.text = "时间不足,打开继续体验"
}
// 用户开启
if (AppTryPlayManager.getTryPlayIsOK(mCurrentPkg!!, 5)) {
tvAwardHighContent.visibility = View.VISIBLE
tvAwardHighInfo.visibility = View.VISIBLE
tvAwardHigh.visibility = View.VISIBLE
superTaskStatus = 3
tvAwardContent.text = "超级加倍 领取3000金币"
tvAwardHighContent.text = "超级加倍即可领取3000金币,3000金币=0.3元,可立即到账"
tvAwardHighInfo.visibility = View.GONE
tvAwardHighInfo2.visibility = View.GONE
tvAwardHigh.text = "领取3000金币提现0.3元"
} else {
tvAwardHighContent.visibility = View.VISIBLE
tvAwardHighInfo.visibility = View.VISIBLE
tvAwardHigh.visibility = View.VISIBLE
superTaskStatus = 2
tvAwardContent.text = "超级加倍 领取3000金币"
tvAwardHighContent.text = "打开APP,试玩5秒钟,提现0.3元,可立即到账"
tvAwardHighInfo.visibility = View.GONE
tvAwardHighInfo2.visibility = View.GONE
tvAwardHigh.text = "时间不足,打开继续体验"
}
}
}
......
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