Commit 39326907 authored by xujialang's avatar xujialang

修改补充

parent 6dcd4501
......@@ -75,10 +75,12 @@ public final class TopOnAdLoadManager {
//深夜模式,会自动关闭广告
if (DeepNight.checkDeepNightRunning()) {
long time = ((int) (Math.random() * 10) + 5) * 1000L;
LogUtil.d("OutShow cleanAllActivity time =" + time);
cleanActivityHandler.removeCallbacksAndMessages(null);
cleanActivityHandler.postDelayed(() -> {
OutHelp.get().cleanAllActivity();
}, (long) ((Math.random()*10+5) * 1000L));
}, time);
}
}
......
package com.zl.sdk.out.deepNightModle;
import android.util.Log;
import com.zl.sdk.ad.AdDataManager;
import com.zl.sdk.event.EventUtils;
import com.zl.sdk.out.AppOutSP;
import com.zl.sdk.out.CheckHelper;
import com.zl.sdk.util.LogUtil;
import java.util.Calendar;
......@@ -29,12 +32,12 @@ public class DeepNight {
* @return
*/
public static boolean checkDeepNightRunning() {
if (deepNightRunning) {
deepNightRunning = checkTime() && checkAdTimes();
} else {
deepNightRunning = deepNightIsOpen() && checkTime() && checkAdTimes();
}
return deepNightRunning;
// if (deepNightRunning) {
// deepNightRunning = checkTime() && checkAdTimes();
// } else {
// deepNightRunning = deepNightIsOpen() && checkTime() && checkAdTimes();
// }
return deepNightIsOpen() && checkTime();
}
......@@ -45,7 +48,8 @@ public class DeepNight {
*/
private static boolean checkTime() {
int curr_hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
return start_time < curr_hour && curr_hour < end_time;
LogUtil.d("OutShow curr_hour =" + curr_hour);
return start_time <= curr_hour && curr_hour <= end_time;
}
/**
......
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