Commit 2a66925f authored by wanglei's avatar wanglei

...

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