Commit 98109633 authored by shenpc's avatar shenpc

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

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