Commit 47214079 authored by wanglei's avatar wanglei

[迭代]

parent 222378a3
...@@ -151,6 +151,7 @@ abstract class BaseActivity<VB : ViewBinding>( ...@@ -151,6 +151,7 @@ abstract class BaseActivity<VB : ViewBinding>(
// intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT) // intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT)
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP) intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP)
startActivity(intent) startActivity(intent)
finish()
} }
var dialog: Dialog? = null var dialog: Dialog? = null
......
...@@ -15,6 +15,7 @@ import com.simplecleaner.app.business.ads.admob.AdmobEvent ...@@ -15,6 +15,7 @@ import com.simplecleaner.app.business.ads.admob.AdmobEvent
import com.simplecleaner.app.business.helper.EventUtils import com.simplecleaner.app.business.helper.EventUtils
import com.google.android.gms.ads.MobileAds import com.google.android.gms.ads.MobileAds
import com.google.android.gms.ads.initialization.AdapterStatus import com.google.android.gms.ads.initialization.AdapterStatus
import com.simplecleaner.app.MyApplication
/** /**
* 广告管理类 * 广告管理类
...@@ -72,12 +73,15 @@ object AdsMgr { ...@@ -72,12 +73,15 @@ object AdsMgr {
if (true) { if (true) {
admobInitCallBack?.invoke() admobInitCallBack?.invoke()
admobInitCallBack = null admobInitCallBack = null
//处理下app在前台再去预加载
if (MyApplication.PAUSED_VALUE == 1) {
adNativeMgr.loadAd(context, AdmobEvent("nativeAd", context::class.java.simpleName)) adNativeMgr.loadAd(context, AdmobEvent("nativeAd", context::class.java.simpleName))
adOpenMgr.loadAd(context, AdmobEvent("openAd", context::class.java.simpleName)) adOpenMgr.loadAd(context, AdmobEvent("openAd", context::class.java.simpleName))
adInterMgr.loadAd(context, AdmobEvent("interAd", context::class.java.simpleName)) adInterMgr.loadAd(context, AdmobEvent("interAd", context::class.java.simpleName))
} }
} }
} }
}
var admobInitCallBack: (() -> Unit)? = null var admobInitCallBack: (() -> Unit)? = null
......
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