Commit 1328a494 authored by xujialang's avatar xujialang

删除:播放广告时,如果5秒内有播放过,则不再播放

parent 77347515
......@@ -49,8 +49,6 @@ public final class TopOnAdLoadManager {
private Handler cleanActivityHandler = new Handler(Looper.getMainLooper());
private long showTimes = 0L;
private TopOnAdInterstitialCallBack adInterstitialCallBack = new TopOnAdInterstitialCallBack() {
@Override
......@@ -73,8 +71,6 @@ public final class TopOnAdLoadManager {
LogUtil.d(TAG, "AdInterstitialCallBack onAdDisplayed adUnitId =" + adUnitId);
flagLoadMap.put(adUnitId, true);
showTimes = System.currentTimeMillis();
callInterstitialAdShow();
countAdShowTimes(adData);
stateAfterShow(adData);
......@@ -150,10 +146,6 @@ public final class TopOnAdLoadManager {
}
};
public boolean canShowAd() {
return System.currentTimeMillis() - showTimes >= 5 * 1000L;
}
private void stateAfterShow(OutAdData.NormalAdData adData) {
try {
boolean isReady = topOnInterstitialAdLoad.isReady(adData.cpAdslot);
......@@ -256,13 +248,6 @@ public final class TopOnAdLoadManager {
private AdBean showAdBean = null;
public void showInterstitialAd(Activity activity, OutAdData.NormalAdData normalAdData, String adScenes) {
if (!canShowAd()) {
LogUtil.d(TAG, "showInterstitialAd 广告播放过于频繁,不能展示");
// callInterstitialNotAd(AdErrorMessage.AD_SHOWING);
return;
}
if (null == normalAdData || TextUtils.isEmpty(normalAdData.cpAdslot)) {
LogUtil.d(TAG, "showInterstitialAd data or adId empty");
callInterstitialNotAd(AdErrorMessage.AD_DATA_IS_NULL_OR_NOT_ADUNITID);
......
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