Commit 2a66925f authored by wanglei's avatar wanglei

...

parent 215a4720
......@@ -3,6 +3,7 @@ package com.base.datarecovery.ads;
import android.content.SharedPreferences;
import android.util.Log;
import com.base.datarecovery.BuildConfig;
import com.base.datarecovery.MyApplication;
import com.base.datarecovery.help.BaseApplication;
import com.base.datarecovery.utils.EventUtils;
......@@ -70,20 +71,22 @@ public class AdDisplayUtils {
}
public boolean shouldShowAd(String ad_unit) {
return true;
// boolean s = shouldDisplayAd() && shouldIncrementClickCount() && shouldIncrementRequestFailAd();
// if (!s) {
// LogEx.INSTANCE.logDebug("glc", "!shouldShowAd", false);
// JSONObject obj2 = new JSONObject();
// try {
// obj2.put("reason", "no ad");
// obj2.put("ad_unit", ad_unit);
// EventUtils.INSTANCE.event("ad_show_error", null, obj2, false);
// } catch (JSONException e) {
//
// }
// }
// return s;
if (BuildConfig.DEBUG) {
return true;
}
boolean s = shouldDisplayAd() && shouldIncrementClickCount() && shouldIncrementRequestFailAd();
if (!s) {
LogEx.INSTANCE.logDebug("glc", "!shouldShowAd", false);
JSONObject obj2 = new JSONObject();
try {
obj2.put("reason", "no ad");
obj2.put("ad_unit", ad_unit);
EventUtils.INSTANCE.event("ad_show_error", null, obj2, false);
} catch (JSONException e) {
}
}
return s;
}
public void incrementAdDisplayCount() {
......
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