Commit 0cb73138 authored by wanglei's avatar wanglei

[修改]广告总开关

parent f7f99a4f
......@@ -10,6 +10,7 @@ import com.applovin.sdk.AppLovinSdkInitializationConfiguration
import com.base.appzxhy.BuildConfig
import com.base.appzxhy.GlobalConfig
import com.base.appzxhy.MyApplication
import com.base.appzxhy.bean.config.AdConfigBean
import com.base.appzxhy.bean.config.AdConfigBean.Companion.adsConfigBean
import com.base.appzxhy.bean.config.ConfigBean.Companion.configBean
import com.base.appzxhy.business.ads.admob.AdBannerMgr
......@@ -167,6 +168,11 @@ object AdsMgr {
) {
eventAdUt()
if (!adsConfigBean.isAdShow) {
showCallBack?.failed()
return
}
if (configBean.isInBlackList) {
EventUtils.event("isInBlackList", "isInBlackList=${configBean.isInBlackList}")
showCallBack?.failed()
......@@ -208,6 +214,11 @@ object AdsMgr {
) {
eventAdUt()
if (!adsConfigBean.isAdShow) {
showCallBack?.failed()
return
}
if (configBean.isInBlackList) {
EventUtils.event("isInBlackList", configBean.isInBlackList.toString())
showCallBack?.failed()
......@@ -233,6 +244,10 @@ object AdsMgr {
@LayoutRes layout: Int,
nativeCallBack: ((Any?) -> Unit)? = null
) {
if (!adsConfigBean.isAdShow) {
nativeCallBack?.invoke(null)
return
}
if (configBean.isInBlackList) {
EventUtils.event("isInBlackList", configBean.isInBlackList.toString())
return
......@@ -260,6 +275,9 @@ object AdsMgr {
* @param parent 展示广告的父布局容器
*/
fun showBanner(parent: ViewGroup, collapsible: Boolean = true, adClose: (() -> Unit)? = null) {
if (!adsConfigBean.isAdShow) {
return
}
if (configBean.isInBlackList) {
EventUtils.event("isInBlackList", configBean.isInBlackList.toString())
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