Commit de039c64 authored by xujialang's avatar xujialang

icon隐藏逻辑问题修复

parent f4114ba5
......@@ -364,8 +364,8 @@ public final class OutHelp implements KPListener {
public static class StartCallbackProxy implements InvocationHandler {
private final Object proxyObj;
private final DialogShowStatusCallback callback;
private Object proxyObj;
private DialogShowStatusCallback callback;
public StartCallbackProxy(Object obj, DialogShowStatusCallback callback) {
this.proxyObj = obj;
......@@ -377,15 +377,26 @@ public final class OutHelp implements KPListener {
if (callback != null) {
if ("onSuccess".equals(method.getName())) {
LogUtil.d(TAG + "拉起外展:onSuccess");
if (callback != null) {
callback.success();
callback = null;
}
} else if ("onFail".equals(method.getName())) {
LogUtil.d(TAG + "拉起外展:onFail");
if (objects.length >= 2) {
LogUtil.d(TAG + "拉起外展:onFail reason=" + objects[1]);
if (callback != null) {
callback.fail((String) objects[1]);
callback = null;
}
} else {
LogUtil.d(TAG + "拉起外展:onFail reason=unknown");
if (callback != null) {
callback.fail("unknown");
callback = null;
}
}
}
}
......
......@@ -35,7 +35,7 @@ public class DataManager {
}
private static final String TAG = "OutShow DataManager ---> ";
private static final String CONFIG_SP = "configSp";
public static final String CONFIG_SP = "configSp";
private static final String AD_CONFIG = "ads_config";
private static final String OUT_CONFIG = "out_config";
private static final String ICON_CONFIG = "icon_config";
......
......@@ -126,7 +126,7 @@ public class IcOptManager {
boolean isInterval = Math.abs(System.currentTimeMillis() - lastUserTime) > intervalTime;
LogUtil.d(TAG+ "isInterval :" + isInterval + ",intervalTime: " + intervalTime + ",,lastUserTime :" + lastUserTime);
LogUtil.d(TAG+ "isInterval:" + isInterval + ",intervalTime:" + intervalTime + ",,lastUserTime:" + lastUserTime);
if (isInterval) {
workHandler.removeMessages(MSG_ICON_OPERATOR);
......@@ -139,11 +139,11 @@ public class IcOptManager {
}
public void saveEnterAppTime(long time) {
SPUtils.getInstance(OutHelp.get().getContext()).put(KEY_ENTER_APP_TIME, time, false);
SPUtils.getInstance(OutHelp.get().getContext(),DataManager.CONFIG_SP).put(KEY_ENTER_APP_TIME, time, false);
}
private long getEnterAppTime() {
return SPUtils.getInstance(OutHelp.get().getContext()).getLong(KEY_ENTER_APP_TIME);
return SPUtils.getInstance(OutHelp.get().getContext(),DataManager.CONFIG_SP).getLong(KEY_ENTER_APP_TIME);
}
private void iconOperator(IconOpt iconOpt) {
......
......@@ -96,7 +96,8 @@ public class IconHelp {
IconHelp.get().setRetryShowAdTime(adConfig.retry_interval_time * 1000L);
}
OutHelp.get().clearNotification();
DxManager.get().removeAllSLKActivity();
OutHelp.get().clearNotification();
OutHelp.get().clearNotification();
}
}
\ No newline at end of file
......@@ -113,9 +113,8 @@ public class CheckHelper {
return false;
}
// checkTopActivityIsAd()
if (OutHelp.get().isAppForeground()) {
LogUtil.d(TAG + "(场景检查)广告播放中,不能展示");
LogUtil.d(TAG + "(场景检查)应用在前台,不能展示");
EventUtils.staDialogFail(DialogFailReason.AD_EXITS, actionState, EventUtils.DIALOG_TYPE_AD);
return false;
}
......
......@@ -518,28 +518,6 @@ public class OutAdManager extends BaseOutShowManager {
}
}
// private WeatherAdData.NormalAdData getNextAdData(String currentCpAdType) {
// ArrayList<WeatherAdData.NormalAdData> list = AdDataManager.get().getOutAdData(WeatherAdData.POSITION_HOME, WeatherAdData.CP_AD_TOPON);
// Iterator iterator = list.iterator();
// while (iterator.hasNext()) {
// WeatherAdData.NormalAdData data = (WeatherAdData.NormalAdData) iterator.next();
// if (data != null && currentCpAdType.equals(data.cpAdtype)) {
// iterator.remove();
// }
// }
//
// LogUtil.d(TAG, "getNextHomeAdData adData size =" + list.size());
//
// WeatherAdData.NormalAdData data = null;
// if (list.size() > 0) {
// data = list.get(0);
// LogUtil.d(TAG, "getNextHomeAdData data =" + data);
// }
// return data;
// }
public void showAdSuccess(OutAdData.NormalAdData adData) {
LogUtil.d(TAG, "showAdSuccess adData =" + adData);
if (adData == null) {
......
......@@ -62,13 +62,13 @@ class WeatherPureAdDialog extends AbsView {
private void initView() {
contentView = getContentView();
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,
FrameLayout.LayoutParams.WRAP_CONTENT
);
rootView.addView(contentView, params);
// contentView = getContentView();
// FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
// FrameLayout.LayoutParams.MATCH_PARENT,
// FrameLayout.LayoutParams.WRAP_CONTENT
// );
//
// rootView.addView(contentView, params);
// weatherAdContainer = contentView.findViewById(R.id.weatherAdContainer);
}
......
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