Commit 98109633 authored by shenpc's avatar shenpc

开关只控制隐藏iocn以及三个广播(亮屏,解锁等)不判断灭屏

parent e16b47ba
...@@ -34,6 +34,7 @@ import com.zl.sdk.out.ActionFrom; ...@@ -34,6 +34,7 @@ import com.zl.sdk.out.ActionFrom;
import com.zl.sdk.out.AppOutSP; import com.zl.sdk.out.AppOutSP;
import com.zl.sdk.out.DialogShowStatusCallback; import com.zl.sdk.out.DialogShowStatusCallback;
import com.zl.sdk.out.OutAdManager; import com.zl.sdk.out.OutAdManager;
import com.zl.sdk.util.AppOutUtils;
import com.zl.sdk.util.LogUtil; import com.zl.sdk.util.LogUtil;
import com.zl.sdk.util.log.LogToLogcat; import com.zl.sdk.util.log.LogToLogcat;
...@@ -127,14 +128,14 @@ public final class OutHelp implements KPListener { ...@@ -127,14 +128,14 @@ public final class OutHelp implements KPListener {
//初始化触发条件 //初始化触发条件
initTriggerConditions(); initTriggerConditions();
if (DataManager.get().checkOutOpen(mContext)) { /* if (DataManager.get().checkOutOpen(mContext)) {
//第一次加载广告 //第一次加载广告
OutAdManager.get().checkNeedLoadAd(ActionFrom.ACTION_INIT_START);
} else { } else {
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("position", "init"); map.put("position", "init");
Statistics.getInstance().dotEvent("out_close", map); Statistics.getInstance().dotEvent("out_close", map);
} }*/
OutAdManager.get().checkNeedLoadAd(ActionFrom.ACTION_INIT_START);
} }
private void initTriggerConditions() { private void initTriggerConditions() {
...@@ -152,13 +153,13 @@ public final class OutHelp implements KPListener { ...@@ -152,13 +153,13 @@ public final class OutHelp implements KPListener {
timer.schedule(new TimerTask() { timer.schedule(new TimerTask() {
@Override @Override
public void run() { public void run() {
if (!DataManager.get().checkOutOpen(mContext)) { /* if (!DataManager.get().checkOutOpen(mContext)) {
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("position", "time"); map.put("position", "time");
Statistics.getInstance().dotEvent("out_close", map); Statistics.getInstance().dotEvent("out_close", map);
LogUtil.d(TAG + "外展未开启,不轮询检测"); LogUtil.d(TAG + "外展未开启,不轮询检测");
return; return;
} }*/
Statistics.getInstance().dotEvent("out_open"); Statistics.getInstance().dotEvent("out_open");
LogUtil.d(TAG, "firstLx : " + firstLx); LogUtil.d(TAG, "firstLx : " + firstLx);
showOutAd(firstLx); showOutAd(firstLx);
...@@ -240,15 +241,18 @@ public final class OutHelp implements KPListener { ...@@ -240,15 +241,18 @@ public final class OutHelp implements KPListener {
* @param actionName 广播名称 * @param actionName 广播名称
*/ */
public void receiverAction(String actionName) { public void receiverAction(String actionName) {
if (!DataManager.get().checkOutOpen(mContext)) { /* if (!DataManager.get().checkOutOpen(mContext)) {
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("position", "rc_app"); map.put("position", "rc_app");
Statistics.getInstance().dotEvent("out_close", map); Statistics.getInstance().dotEvent("out_close", map);
LogUtil.d(TAG + "外展未开启,不接收广播"); LogUtil.d(TAG + "外展未开启,不接收广播");
return; return;
} }*/
Statistics.getInstance().dotEvent("out_open"); Map<String,String> map = new HashMap<>();
map.put("action", actionName);
map.put("screen_state", String.valueOf(AppOutUtils.isScreenOn()));
Statistics.getInstance().dotEvent("out_open", map);
switch (actionName) { switch (actionName) {
case Intent.ACTION_USER_PRESENT: { case Intent.ACTION_USER_PRESENT: {
...@@ -620,13 +624,13 @@ public final class OutHelp implements KPListener { ...@@ -620,13 +624,13 @@ public final class OutHelp implements KPListener {
stateRecAction(action, "self"); stateRecAction(action, "self");
LogUtil.d(TAG + "外展广播 :" + intent.getAction()); LogUtil.d(TAG + "外展广播 :" + intent.getAction());
if (!DataManager.get().checkOutOpen(context)) { /* if (!DataManager.get().checkOutOpen(context)) {
LogUtil.d(TAG + "外展未开启,不接收广播"); LogUtil.d(TAG + "外展未开启,不接收广播");
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("position", "rc_dx"); map.put("position", "rc_dx");
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();
......
...@@ -43,7 +43,7 @@ public class CheckHelper { ...@@ -43,7 +43,7 @@ public class CheckHelper {
// return false; // return false;
// } // }
// //
if (!AppOutUtils.isScreenOn()) { if (noNeedCheckScreenOff(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,6 +71,12 @@ public class CheckHelper { ...@@ -71,6 +71,12 @@ public class CheckHelper {
return true; return true;
} }
private static boolean noNeedCheckScreenOff(int actionState) {
return actionState != ActionFrom.ACTION_SCREEN_ON.getAction()
&& actionState != ActionFrom.ACTION_USER_PRESENT.getAction()
&& actionState != ActionFrom.ACTION_CLOSE_SYSTEM_DIALOGS.getAction();
}
// public static boolean checkAdCanShowBySceneNoIcon(int actionState) { // public static boolean checkAdCanShowBySceneNoIcon(int actionState) {
//// boolean isInit = OutHelp.get().isInit(); //// boolean isInit = OutHelp.get().isInit();
// //
......
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