Commit 3d3e9952 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 2e60ed9a
...@@ -56,6 +56,8 @@ class KsVideoAdManager private constructor(activity: Activity) : ...@@ -56,6 +56,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
KsAdSDK.getLoadManager().loadRewardVideoAd(scene, object : KsLoadManager.RewardVideoAdListener { KsAdSDK.getLoadManager().loadRewardVideoAd(scene, object : KsLoadManager.RewardVideoAdListener {
override fun onError(p0: Int, p1: String?) { override fun onError(p0: Int, p1: String?) {
videoAdStatusListener?.adFail() videoAdStatusListener?.adFail()
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_ONE, p0.toString(), p1)
} }
override fun onRewardVideoAdLoad(p0: MutableList<KsRewardVideoAd>?) { override fun onRewardVideoAdLoad(p0: MutableList<KsRewardVideoAd>?) {
...@@ -93,7 +95,7 @@ class KsVideoAdManager private constructor(activity: Activity) : ...@@ -93,7 +95,7 @@ class KsVideoAdManager private constructor(activity: Activity) :
override fun onVideoPlayError(p0: Int, p1: Int) { override fun onVideoPlayError(p0: Int, p1: Int) {
// ToastUtil.show(activity, "快手激励视频⼴告播放出错") // ToastUtil.show(activity, "快手激励视频⼴告播放出错")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_ONE, (p0).toString(), "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_KS, Constant.EVENT_TYPE_ONE, (p0).toString(), (p1).toString())
videoAdStatusListener?.adFail() videoAdStatusListener?.adFail()
} }
......
...@@ -104,7 +104,7 @@ class ShVideoAdManager private constructor(activity: Activity) : ...@@ -104,7 +104,7 @@ class ShVideoAdManager private constructor(activity: Activity) :
override fun onAdFailed(adError: ADError) { override fun onAdFailed(adError: ADError) {
LogUtil.d(TAG, "onAdFailed") LogUtil.d(TAG, "onAdFailed")
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SH, Constant.EVENT_TYPE_ONE, (adError.code).toString(), "") TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_SH, Constant.EVENT_TYPE_ONE, (adError.code).toString(), adError.description)
videoAdStatusListener?.adFail() videoAdStatusListener?.adFail()
} }
......
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