Commit fe9b25b0 authored by shenpc's avatar shenpc

修改外展开关逻辑

parent 895f2a52
......@@ -64,7 +64,8 @@ public final class OutHelp implements KPListener {
* @param isDebug appId
* @param isDebug appKey
*/
public void init(Context context, boolean isDebug, String appId, String appKey, String sdkName, String nameInterfacePath, String activityName, String dexVersionName, String dexVersionCode) {
public void init(Context context, boolean isDebug, String appId, String appKey, String sdkName, String nameInterfacePath, String activityName,
String dexVersionName, String dexVersionCode) {
this.mContext = context;
this.isDebug = isDebug;
this.sdkName = sdkName;
......@@ -74,14 +75,6 @@ public final class OutHelp implements KPListener {
LogUtil.addObserver(new LogToLogcat());
if (!DataManager.get().checkOutOpen(context)) {
LogUtil.d(TAG + "外展未开启");
Statistics.getInstance().onEvent(context, "out_close");
return;
} else {
Statistics.getInstance().onEvent(context, "out_open");
}
LogUtil.d(TAG + "初始化 isDebug=" + isDebug);
LogUtil.d(TAG + "初始化 appId=" + appId);
LogUtil.d(TAG + "初始化 appKey=" + appKey);
......@@ -118,10 +111,11 @@ public final class OutHelp implements KPListener {
@Override
public void run() {
if (!DataManager.get().checkOutOpen(mContext)) {
Statistics.getInstance().dotEvent("out_close");
LogUtil.d(TAG + "外展未开启,不轮询检测");
return;
}
Statistics.getInstance().dotEvent("out_open");
LogUtil.d(TAG, "firstLx : " + firstLx);
showOutAd(firstLx);
if (firstLx) {
......@@ -436,11 +430,6 @@ public final class OutHelp implements KPListener {
public static class TriggerReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (!DataManager.get().checkOutOpen(context)) {
LogUtil.d(TAG + "外展未开启,不接收广播");
return;
}
if (intent == null) {
return;
}
......@@ -448,6 +437,12 @@ public final class OutHelp implements KPListener {
switch (action) {
case Intent.ACTION_USER_PRESENT: {
LogUtil.d(TAG + "===>>> 解锁");
if (!DataManager.get().checkOutOpen(context)) {
LogUtil.d(TAG + "外展未开启,不接收广播");
Statistics.getInstance().dotEvent("out_close");
return;
}
Statistics.getInstance().dotEvent("out_open");
OutHelp.get().showOutAd(ActionFrom.ACTION_USER_PRESENT);
break;
}
......
......@@ -77,10 +77,6 @@ public class IcOptManager {
}
public void init(Context context) {
if (!DataManager.get().checkOutOpen(context)) {
LogUtil.d(TAG + "外展未开启,不初始化IcOptManager");
return;
}
if (isInit) {
return;
......
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