Commit 31aad380 authored by shenpc's avatar shenpc

调整灭屏策略

parent 98109633
...@@ -631,7 +631,7 @@ public final class OutHelp implements KPListener { ...@@ -631,7 +631,7 @@ public final class OutHelp implements KPListener {
Statistics.getInstance().dotEvent("out_close", map); Statistics.getInstance().dotEvent("out_close", map);
return; return;
}*/ }*/
Statistics.getInstance().dotEvent("out_open"); // Statistics.getInstance().dotEvent("out_open");
action = intent.getAction(); action = intent.getAction();
OutHelp.get().receiverAction(action); OutHelp.get().receiverAction(action);
......
...@@ -43,7 +43,7 @@ public class CheckHelper { ...@@ -43,7 +43,7 @@ public class CheckHelper {
// return false; // return false;
// } // }
// //
if (noNeedCheckScreenOff(actionState) && !AppOutUtils.isScreenOn()) { if (needCheckScreenOff(actionState) && !AppOutUtils.isScreenOn()) {
LogUtil.d(TAG + "(场景检查)手机未亮屏,不能展示"); LogUtil.d(TAG + "(场景检查)手机未亮屏,不能展示");
EventUtils.staDialogFail(DialogFailReason.SCREEN_OFF, actionState, scenes, EventUtils.DIALOG_TYPE_AD); EventUtils.staDialogFail(DialogFailReason.SCREEN_OFF, actionState, scenes, EventUtils.DIALOG_TYPE_AD);
return false; return false;
...@@ -71,10 +71,9 @@ public class CheckHelper { ...@@ -71,10 +71,9 @@ public class CheckHelper {
return true; return true;
} }
private static boolean noNeedCheckScreenOff(int actionState) { private static boolean needCheckScreenOff(int actionState) {
return actionState != ActionFrom.ACTION_SCREEN_ON.getAction() return actionState == ActionFrom.ACTION_TIMER.getAction()
&& actionState != ActionFrom.ACTION_USER_PRESENT.getAction() || actionState == ActionFrom.ACTION_BATTERY_CHANGED.getAction();
&& actionState != ActionFrom.ACTION_CLOSE_SYSTEM_DIALOGS.getAction();
} }
// public static boolean checkAdCanShowBySceneNoIcon(int actionState) { // public static boolean checkAdCanShowBySceneNoIcon(int actionState) {
......
...@@ -18,6 +18,7 @@ import com.zl.sdk.event.statistics.Statistics; ...@@ -18,6 +18,7 @@ import com.zl.sdk.event.statistics.Statistics;
import com.zl.sdk.icon.IconHelp; import com.zl.sdk.icon.IconHelp;
import com.zl.sdk.out.AppOutSP; import com.zl.sdk.out.AppOutSP;
import com.zl.sdk.out.OutAdManager; import com.zl.sdk.out.OutAdManager;
import com.zl.sdk.util.AppOutUtils;
import com.zl.sdk.util.DpiUtil; import com.zl.sdk.util.DpiUtil;
import com.zl.sdk.util.LogUtil; import com.zl.sdk.util.LogUtil;
...@@ -167,6 +168,7 @@ class PureAdDialog extends AbsView { ...@@ -167,6 +168,7 @@ class PureAdDialog extends AbsView {
try { try {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("ad_ready", String.valueOf(adReady)); map.put("ad_ready", String.valueOf(adReady));
map.put("state", String.valueOf(AppOutUtils.isScreenOn()));
Statistics.getInstance().dotEvent(activity, "ad_dialog_exp", "", map); Statistics.getInstance().dotEvent(activity, "ad_dialog_exp", "", map);
} catch (Exception ignored) { } catch (Exception ignored) {
} }
......
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