From cbb88109494ffc7916f6639c20ce05c0cec941a9 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 07 四月 2021 15:07:45 +0800
Subject: [PATCH] 3.9.1bug修复

---
 BuWanVideo/src/com/weikou/beibeivideo/util/ad/ExpressAdManager.java |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/BuWanVideo/src/com/weikou/beibeivideo/util/ad/ExpressAdManager.java b/BuWanVideo/src/com/weikou/beibeivideo/util/ad/ExpressAdManager.java
index 3ecb41d..285db9f 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/util/ad/ExpressAdManager.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/util/ad/ExpressAdManager.java
@@ -127,12 +127,12 @@
         //鍔犺浇澶у浘
         int deviceWidth = DimenUtils.getScreenWidth(mContext);
         deviceWidth = DimenUtils.px2dip(mContext, deviceWidth);
-        int width = deviceWidth - 6;
+        int width = deviceWidth -9 * 2;
         int height = (int) (width * 0.8);
         String pid = null;
         if (sourceType == AdUtil.AD_TYPE.csj) {
             pid = CSJConstant.RECOMMEND_BIG_IMG_AD;
-            height = (int) (width * 0.56);
+            height = (int) (width * 0.78);
         } else if (sourceType == AdUtil.AD_TYPE.gdt) {
             pid = BeibeiConstant.GDT_RECOMMAND_NATIVE;
         } else if (sourceType == AdUtil.AD_TYPE.gdt2) {
@@ -180,6 +180,8 @@
         } else if (sourceType == AdUtil.AD_TYPE.gdt2) {
             pid = GDTConstant.PID_2_VIDEO_DETAIL_PLAY_EXPRESS1;
         }
+        if (mContext == null)
+            return;
         //鑾峰彇灞忓箷鐨勫
         int deviceWidth = DimenUtils.getScreenWidth(mContext);
         deviceWidth = DimenUtils.px2dip(mContext, deviceWidth);
@@ -245,7 +247,7 @@
         String pid = null;
         if (sourceType == AdUtil.AD_TYPE.csj) {
             pid = "945379581";
-        } else if (sourceType == AdUtil.AD_TYPE.gdt) {
+        } else if (sourceType == AdUtil.AD_TYPE.gdt2) {
             pid = BeibeiConstant.GDT_SEARCH_RESULT_MIN_NATIVE;
         }
         //鑾峰彇灞忓箷鐨勫

--
Gitblit v1.8.0