Commit 3b319ff5 authored by wanglei's avatar wanglei

...

parent 09eb907b
......@@ -240,7 +240,7 @@ object AdsMgr {
}
}
fun isNativeShow() = (isAdmobInit && !configBean.isInBlackList) && LimitUtils.isAdShow(AdsType.NATIVE, null)
fun isNativeShow() = LimitUtils.isAdShow(AdsType.NATIVE, null)
/**
* 展示banner广告
......
......@@ -22,10 +22,11 @@ class AlarmReceiver : BroadcastReceiver() {
@SuppressLint("UnsafeProtectedBroadcastReceiver")
override fun onReceive(context: Context, intent: Intent?) {
LogEx.logDebug(TAG, "AlarmJobReceiver onReceive")
EventUtils.event("alarm_push")
EventUtils.event("alarm_onReceive")
val lastAlarmTime = AppPreferences.getInstance().getLong("lastAlarmTime", 0L)
val currentTime = System.currentTimeMillis()
if (lastAlarmTime == 0L || currentTime - lastAlarmTime >= 1000 * 30 * 60) {
EventUtils.event("alarm_push")
sendNotificationIfCan(context, PopupConstObject.POPUP_WHERE_ALARM)
AppPreferences.getInstance().put("lastAlarmTime", System.currentTimeMillis())
}
......
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