From daea6f9a47aae244b5fa02b5c790519934711760 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 26 二月 2025 16:25:22 +0800
Subject: [PATCH] 新版穿山甲接入

---
 BuWanVideo/build.gradle                                                    |   19 ++----
 BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoApplication.java          |    2 
 BuWanVideo/assets/SDK_Setting_5095354.json                                 |   18 +++++
 BuWanVideo/src/com/weikou/beibeivideo/ui/main/HomeFragment.java            |   12 ++--
 /dev/null                                                                  |   17 -----
 library-common/src/com/lcjian/library/util/common/AndroidManifestUtil.java |   18 ++++-
 BuWanVideo/res/layout/act_login.xml                                        |    3 
 BuWanVideo/src/com/weikou/beibeivideo/ui/login/LoginActivity.java          |    6 +-
 BuWanVideo/src/com/weikou/beibeivideo/util/ad/AdUtil.java                  |   22 +++++--
 BuWanVideo/AndroidManifest.xml                                             |    2 
 BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/SearchActivity.java     |    4 
 BuWanVideo/src/com/weikou/beibeivideo/ui/media/EpisodeFragment.java        |    5 +
 BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java  |   10 +++
 BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java            |   33 +++++++---
 14 files changed, 102 insertions(+), 69 deletions(-)

diff --git a/BuWanVideo/AndroidManifest.xml b/BuWanVideo/AndroidManifest.xml
index c47d81e..e0261db 100644
--- a/BuWanVideo/AndroidManifest.xml
+++ b/BuWanVideo/AndroidManifest.xml
@@ -337,7 +337,7 @@
             android:value="570f28a578d6e12cba6f7f200b8d1c83"></meta-data>
         <meta-data
             android:name="UMENG_CHANNEL"
-            android:value="vivo"></meta-data>
+            android:value="oppo"></meta-data>
 
 
         <provider
diff --git a/BuWanVideo/assets/SDK_Setting_5095354.json b/BuWanVideo/assets/SDK_Setting_5095354.json
index e443445..a959798 100644
--- a/BuWanVideo/assets/SDK_Setting_5095354.json
+++ b/BuWanVideo/assets/SDK_Setting_5095354.json
@@ -43,7 +43,8 @@
 		"draw_banner_code_id": "947590714",
 		"drama_rewarded_ad_code_id": "952314219",
 		"drama_rewarded_ad_code_id_02": "952314221",
-		"drama_draw_ad_code_id": "952314220"
+		"drama_draw_ad_code_id": "952314220",
+		"staggered_grid_ad_code_id_02": "961663478"
 	},
 	"novel": {
 		"status": 1,
@@ -55,5 +56,18 @@
 		"end_ad_code_id": "947236544"
 	},
 	"live": null,
-	"license_config": null
+	"license_config": [
+		{
+			"PackageName": "com.doudou.ysvideo",
+			"BundleId": "com.doudou.ysvideo",
+			"StartTime": "20250226T025005Z",
+			"ExpireTime": "20270226T025005Z",
+			"CreatedTime": "20250226T025005Z",
+			"Signature": "DGR9Bt+vLkk6lJJKdtWFyDw/hDRLIPv0OPwqJaOqLv3BqW2vK2v/NLdHgUpmLTnIB0ICoP+xyvR/omSmy3XWpkxy4rVUDmd/f5N58xWeTM7c6igcpkMJhdK/wpRGhVdlWLT8fJjCbFvUwtBT3Rfv6dL0VZ+Rbxkr+j0AsgKDOTbqMgHLMCE5vR9U2q6WV+tr/vfxSINLECSKy1EuiyT9uoisVnYK5PzvVtdTE2hehf+xDxkTK2SXADsmXsmpffYjwoTmt5tszEdPyjSx3VsaJJjawgrRLdHp4PjCCTiKAXTX3wdCKNMZZ2weIJv1t3A1syh/+XWony1tgZ3EM4j45Q==",
+			"Content": "eyJJZCI6IjQ1NjM4MTQ0MiIsICJWZXJzaW9uIjoyLCAiQ2hhbm5lbCI6ImFkX2NzaiIsICJUeXBlIjoyLCAiUGFja2FnZU5hbWUiOiJjb20uZG91ZG91LnlzdmlkZW8iLCAiQnVuZGxlSWQiOiJjb20uZG91ZG91LnlzdmlkZW8iLCAiTW9kdWxlcyI6W3siTmFtZSI6InZvZF9wbGF5IiwgIkVkaXRpb24iOiJwcmVtaXVtX2VkaXRpb24iLCAiU3RhcnRUaW1lIjoxNzQwNTM4MjA1MjcwLCAiRXhwaXJlVGltZSI6MTgwMzYxMDIwNTI3MCwgIkV4cGlyZUJ1ZmZlciI6MTU1NTIwMDAwMDB9XSwgIkZpbGVWZXJzaW9uIjoiMTc0MDUzODIwNTI4MzAzMjk4MSJ9",
+			"MainURL": "https://vod-license-m.volccdn.com/vod-license/l-456381442-ch-ad_csj-a-300965.lic?lk3s=0d9f7a7d\u0026x-expires=4894138205\u0026x-signature=0yUX6Rv4bQg9wavpPZQoOX3THGA%3D",
+			"BackupURL": "https://vod-license-b.volccdn.com/vod-license/l-456381442-ch-ad_csj-a-300965.lic?lk3s=0d9f7a7d\u0026x-expires=4894138205\u0026x-signature=qWAEGejcRE7mn6%2Fxmdu4WKl%2BESQ%3D",
+			"Id": "456381442"
+		}
+	]
 }
\ No newline at end of file
diff --git a/BuWanVideo/build.gradle b/BuWanVideo/build.gradle
index 1581c2a..9346e50 100644
--- a/BuWanVideo/build.gradle
+++ b/BuWanVideo/build.gradle
@@ -1,9 +1,7 @@
 apply plugin: 'android'
 apply plugin: 'com.huawei.agconnect'
-//apply from: 'https://sf3-fe-tos.pglstatp-toutiao.com/obj/pangle-empower/android/pangrowth_media/plugin_config.gradle'
 
 configurations.all {
-    exclude group: "com.bytedance.boringssl.so", module: 'boringssl-so'
     //鑻ユ帴鍏ユ祦濯掍綋sdk锛堝皬瑙嗛銆佺洿鎾級闇�瑕乫orce constraint-layout鐗堟湰
     resolutionStrategy {
         force 'com.android.support.constraint:constraint-layout:1.1.2'
@@ -102,15 +100,13 @@
 //    }
 //    implementation('com.volcengine:apm_insight_crash:1.4.2')
 //    implementation('com.volcengine:apm_insight_sdk:1.0.3')
-    // 5.6.1.5
-//    implementation 'com.pangle.cn:ads-sdk-pro:6.3.1.7'
-    implementation 'com.pangle.cn:mediation-sdk:6.3.1.7'
-    implementation("com.pangle.cn:pangrowth-dpsdk:5.1.1.0") {
+    implementation 'com.pangle.cn:mediation-sdk:6.6.0.7'
+    implementation ('com.pangle.cn:pangrowth-dpsdk:5.2.1.0'){
         exclude group: 'com.pangle.cn', module: 'adclog'
     }
-    implementation 'com.pangle.cn:pangrowth-base:2.1.0.0'
-    implementation 'com.pangle.cn:pangrowth-djx-sdk:2.1.0.0'
-    implementation 'com.pangle.cn:pangrowth-nov-sdk:2.1.0.0'
+    implementation 'com.pangle.cn:pangrowth-base:2.7.0.0'
+    implementation 'com.pangle.cn:pangrowth-djx-sdk-lite:2.7.0.0'
+    implementation 'com.pangle.cn:pangrowth-nov-sdk:2.7.0.0'
     implementation 'com.bytedance.applog:RangersAppLog-Lite-cn:6.15.3'
 
 
@@ -156,15 +152,14 @@
             java {
                 exclude '**/XMPushMessageReceiver.java'
             }
-
         }
 
     }
 
     defaultConfig {
         applicationId "com.doudou.ysvideo"
-        versionCode 149
-        versionName "3.10.31"
+        versionCode 153
+        versionName "3.11.2"
         multiDexEnabled = true
         minSdkVersion 21
         targetSdkVersion 30
diff --git a/BuWanVideo/res/layout/act_login.xml b/BuWanVideo/res/layout/act_login.xml
index 2651f45..0babffb 100644
--- a/BuWanVideo/res/layout/act_login.xml
+++ b/BuWanVideo/res/layout/act_login.xml
@@ -82,6 +82,8 @@
                                 android:layout_marginBottom="80dp">
 
                                 <LinearLayout
+                                    android:visibility="gone"
+                                    android:layout_marginRight="58dp"
                                     android:id="@+id/ll_login_qq"
                                     android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
@@ -109,7 +111,6 @@
                                     android:id="@+id/ll_login_wx"
                                     android:layout_width="wrap_content"
                                     android:layout_height="wrap_content"
-                                    android:layout_marginLeft="58dp"
                                     android:gravity="center_horizontal"
                                     android:orientation="vertical">
 
diff --git a/BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoApplication.java b/BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoApplication.java
index d55b014..b0fe8d0 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoApplication.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoApplication.java
@@ -485,7 +485,7 @@
                     }
                     @Override
                     public boolean isCanUseApplist() { //鏄惁鍏佽鑾峰彇搴旂敤鍒楄〃锛岄粯璁ゅ厑璁�
-                        return true;
+                        return false;
                     }
                     @Override
                     public boolean isCanUseAndroidId() {//鏄惁鍏佽鑾峰彇 AndroidId锛岄粯璁ゅ厑璁�
diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/login/LoginActivity.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/login/LoginActivity.java
index acc9c7e..7bdda93 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/ui/login/LoginActivity.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/login/LoginActivity.java
@@ -151,7 +151,7 @@
                     SingleToast.showToast(LoginActivity.this, "閫夋嫨鍚屾剰鐢ㄦ埛鍗忚鍚庢柟鍙櫥褰�");
                     break;
                 }
-                if (Build.VERSION.SDK_INT < 30) {
+                if (Build.VERSION.SDK_INT < 30&&false) {
                     //Android 11浠ヤ笅鐨勮璇锋眰瀹夎搴旂敤鍒楄〃
                     if (mPermissionsChecker.lacksPermissions(getPermissions())) {//妫�娴嬫槸鍚︽湁鍐欏叆鐨勬潈闄�
                         mPermissionsChecker.showNormalDialog("璁惧搴旂敤鍒楄〃鏉冮檺璇存槑", "鍒ゆ柇璁惧鏄惁瀹夎QQ/寰俊锛岀敤浜庝笁鏂圭櫥褰�");
@@ -173,8 +173,8 @@
                     SingleToast.showToast(LoginActivity.this, "閫夋嫨鍚屾剰鐢ㄦ埛鍗忚鍚庢柟鍙櫥褰�");
                     break;
                 }
-
-                if (Build.VERSION.SDK_INT < 30) {
+//                Toast.makeText(this, String.format("鍩哄甫鐗堟湰锛�%s  SDK鐗堟湰锛�%s", Build.BRAND, Build.VERSION.SDK_INT), Toast.LENGTH_LONG).show();
+                if (Build.VERSION.SDK_INT < 30&&false) {
                     //Android 11浠ヤ笅鐨勮璇锋眰瀹夎搴旂敤鍒楄〃
                     if (mPermissionsChecker.lacksPermissions(getPermissions())) {//妫�娴嬫槸鍚︽湁鍐欏叆鐨勬潈闄�
                         mPermissionsChecker.showNormalDialog("璁惧搴旂敤鍒楄〃鏉冮檺璇存槑", "鍒ゆ柇璁惧鏄惁瀹夎QQ/寰俊锛岀敤浜庝笁鏂圭櫥褰�");
diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/main/HomeFragment.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/main/HomeFragment.java
index ca479b1..73cf8d5 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/ui/main/HomeFragment.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/main/HomeFragment.java
@@ -313,12 +313,12 @@
                                     feedVideos.setName("鐑棬");
                                     categories.add(1, feedVideos);
                                     //鎶栭煶鐭墽
-                                    if(!AndroidManifestUtil.isHuaWeiChannel(getContext())) {
-                                        feedVideos = new HomeClass();
-                                        feedVideos.setDataType("dyDrama");
-                                        feedVideos.setName("鍓у満");
-                                        categories.add(1, feedVideos);
-                                    }
+//                                    if(!AndroidManifestUtil.isHuaWeiChannel(getContext())) {
+                                    feedVideos = new HomeClass();
+                                    feedVideos.setDataType("dyDrama");
+                                    feedVideos.setName("鍓у満");
+                                    categories.add(1, feedVideos);
+//                                    }
                                 }
                             }
 
diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java
index 579360f..8fb2e8b 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java
@@ -218,11 +218,11 @@
         findViewById(R.id.ll_activity_login).setOnClickListener(this);
         findViewById(R.id.fl_category).setOnClickListener(this);
 
-        if (AndroidManifestUtil.isHuaWeiChannel(getApplicationContext())) {
-            mAQuery.id(R.id.rb_nav_short_tv).visibility(View.GONE);
-        } else {
-            mAQuery.id(R.id.rb_nav_short_tv).visibility(View.VISIBLE);
-        }
+//        if (AndroidManifestUtil.isHuaWeiChannel(getApplicationContext())) {
+//            mAQuery.id(R.id.rb_nav_short_tv).visibility(View.GONE);
+//        } else {
+//            mAQuery.id(R.id.rb_nav_short_tv).visibility(View.VISIBLE);
+//        }
 
 
         initialer.run();
@@ -292,12 +292,12 @@
             }
         });
 
-        if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {
-            String[] permissions={
-                    Manifest.permission.READ_PHONE_STATE
-            };
-            ActivityCompat.requestPermissions(MainActivity.this, permissions, 10010);
-        }
+//        if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {
+//            String[] permissions={
+//                    Manifest.permission.READ_PHONE_STATE
+//            };
+//            ActivityCompat.requestPermissions(MainActivity.this, permissions, 10010);
+//        }
     }
 
     /**
@@ -455,6 +455,13 @@
             return;
         }
 
+        if(AndroidManifestUtil.isVIVOChannel(getApplicationContext())){
+          if(!AdUtil.canShowAd(getApplicationContext(), AndroidManifestUtil.getChannel(this), AdPositionEnum.homeInterstitial)){
+              // VIVO棣栭〉鎻掑睆涓�澶╂樉绀轰竴娆�
+              return;
+          }
+        }
+
 
         adCallback = new Runnable() {
             @Override
@@ -482,6 +489,10 @@
                 else {
                     InterstitialAdUtil.showAd(MainActivity.this, type, GDTConstant.HOME_INTERSTITIAL);
                 }
+
+                if(AndroidManifestUtil.isVIVOChannel(getApplicationContext())){
+                    AdUtil.setAdShown(getApplicationContext(), AndroidManifestUtil.getChannel(getApplicationContext()), AdPositionEnum.homeInterstitial);
+                }
             }
         };
         //寤惰繜涓夌鏄剧ず
diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/media/EpisodeFragment.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/media/EpisodeFragment.java
index 9c0dd13..7e36d35 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/ui/media/EpisodeFragment.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/media/EpisodeFragment.java
@@ -510,13 +510,16 @@
         if ("vivo".equalsIgnoreCase(AndroidManifestUtil.getChannel(getContext()))) {
             return;
         }
+        if( AndroidManifestUtil.isHuaWeiChannel(getContext())){
+            return;
+        }
 
 
         if (AdUtil.getAdType(getContext(), AdPositionEnum.splash) == null) {
             return;
         }
 
-        AdUtil.AD_TYPE adType = AndroidManifestUtil.isHuaWeiChannel(getContext())?AdUtil.AD_TYPE.hw: AdUtil.AD_TYPE.gdt2;
+        AdUtil.AD_TYPE adType = AdUtil.AD_TYPE.gdt2;
         if(AndroidManifestUtil.isOppoChannel(getContext())){
             adType = null;
         }
diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java
index d0b0b94..ccde355 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java
@@ -46,6 +46,8 @@
 import com.weikou.beibeivideo.BasicTextHttpResponseHandler;
 import com.weikou.beibeivideo.BeibeiVideoAPI;
 import com.weikou.beibeivideo.R;
+import com.weikou.beibeivideo.entity.AdTag;
+import com.weikou.beibeivideo.entity.AdType;
 import com.weikou.beibeivideo.entity.HomeAd;
 import com.weikou.beibeivideo.entity.HomeType;
 import com.weikou.beibeivideo.entity.HomeTypeItem;
@@ -53,6 +55,7 @@
 import com.weikou.beibeivideo.entity.JumpDetail;
 import com.weikou.beibeivideo.entity.VideoInfo;
 import com.weikou.beibeivideo.entity.VideoType;
+import com.weikou.beibeivideo.entity.ad.AdPositionEnum;
 import com.weikou.beibeivideo.entity.ad.ExpressAdContainer;
 import com.weikou.beibeivideo.entity.recommend.HomeClass;
 import com.weikou.beibeivideo.ui.category.bean.HotStar;
@@ -403,11 +406,16 @@
         {
             return;
         }
+
+        AdUtil.AD_TYPE adType = AdUtil.getAdType(getContext(), AdPositionEnum.homeInterstitial);
+        if(adType==null){
+            return;
+        }
         Log.i(TAG, "璇锋眰棣栭〉澶у箍鍛�");
         try {
 
 //            ExpressAdManager recommendAdManager = new ExpressAdManager(AdUtil.AD_TYPE.hw, context);
-            ExpressAdManager recommendAdManager = new ExpressAdManager(AndroidManifestUtil.isHuaWeiChannel(getContext())?AdUtil.AD_TYPE.hw: AdUtil.AD_TYPE.csj, context);
+            ExpressAdManager recommendAdManager = new ExpressAdManager(adType, context);
             recommendAdManager.loadRecommendLargeAd(new ExpressAdManager.IAdLoadListener() {
                 @Override
                 public void onSuccess(final List<ExpressAdContainer> adList) {
diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/SearchActivity.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/SearchActivity.java
index 1c73e38..e9848af 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/SearchActivity.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/SearchActivity.java
@@ -482,8 +482,8 @@
                             } else
                                 newAdType = AdUtil.AD_TYPE.gdt2;
 
-                            if (AndroidManifestUtil.isHuaWeiChannel(getApplicationContext()))
-                                newAdType = AdUtil.AD_TYPE.hw;
+//                            if (AndroidManifestUtil.isHuaWeiChannel(getApplicationContext()))
+//                                newAdType = AdUtil.AD_TYPE.hw;
 
                             new ExpressAdManager(newAdType, getApplicationContext()).loadSearchAd(DimenUtils.px2dip(getApplicationContext(), width), new ExpressAdManager.IAdLoadListener() {
                                 @Override
diff --git a/BuWanVideo/src/com/weikou/beibeivideo/util/ad/AdUtil.java b/BuWanVideo/src/com/weikou/beibeivideo/util/ad/AdUtil.java
index addac33..5071cff 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/util/ad/AdUtil.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/util/ad/AdUtil.java
@@ -73,9 +73,9 @@
                 JSONObject object = new JSONObject(config);
                 object = object.optJSONObject(position.getPositionName());
                 if (object != null)
-                    if (AndroidManifestUtil.isHuaWeiChannel(context)&&false){
+                    if (AndroidManifestUtil.isHuaWeiChannel(context) && false) {
                         return AD_TYPE.hw;
-                    }else {
+                    } else {
                         return AD_TYPE.valueOf(object.optString("type"));
                     }
             } catch (JSONException e) {
@@ -84,7 +84,7 @@
                 return null;
             }
         } else {
-            if (AndroidManifestUtil.isHuaWeiChannel(context)&&false) {
+            if (AndroidManifestUtil.isHuaWeiChannel(context) && false) {
                 return AD_TYPE.hw;
             } else {
                 return AD_TYPE.gdt;
@@ -183,8 +183,18 @@
 
     // 鏄惁鍙互鏄剧ず鍗庝负鐨勫箍鍛�
     public static boolean canShowAdHuaWei(Context context, AdPositionEnum position) {
+        return canShowAd(context, "huawei", position);
+    }
+
+    public static void setAdHuaWeiShown(Context context, AdPositionEnum position) {
+        setAdShown(context, "huawei", position);
+    }
+
+
+    // 鏄惁鍙互鏄剧ず鍗庝负鐨勫箍鍛�
+    public static boolean canShowAd(Context context, String channel, AdPositionEnum position) {
         SharedPreferences share = context.getSharedPreferences("adConfig", Context.MODE_PRIVATE);
-        Long lastTime = share.getLong("huawei_show_time_" + position.name(), 0);
+        long lastTime = share.getLong(channel + "_show_time_" + position.name(), 0);
         if (TimeUtils.millisToStringDate(System.currentTimeMillis(), "yyyyMMdd").equalsIgnoreCase(TimeUtils.millisToStringDate(lastTime, "yyyyMMdd"))) {
             //鍚屼竴澶�
             return false;
@@ -192,10 +202,10 @@
         return true;
     }
 
-    public static void setAdHuaWeiShown(Context context, AdPositionEnum position) {
+    public static void setAdShown(Context context, String channel, AdPositionEnum position) {
         SharedPreferences share = context.getSharedPreferences("adConfig", Context.MODE_PRIVATE);
         SharedPreferences.Editor editor = share.edit();
-        editor.putLong("huawei_show_time_" + position.name(), System.currentTimeMillis());
+        editor.putLong(channel + "_show_time_" + position.name(), System.currentTimeMillis());
         editor.commit();
     }
 
diff --git a/library-common/src/com/lcjian/library/util/common/AndroidManifestUtil.java b/library-common/src/com/lcjian/library/util/common/AndroidManifestUtil.java
index 38bbe6e..b7e3ffb 100644
--- a/library-common/src/com/lcjian/library/util/common/AndroidManifestUtil.java
+++ b/library-common/src/com/lcjian/library/util/common/AndroidManifestUtil.java
@@ -1,24 +1,32 @@
 package com.lcjian.library.util.common;
 
 import android.content.Context;
+import android.os.Build;
 
 import com.lcjian.library.util.ManifestDataUtil;
 
 public class AndroidManifestUtil {
 
-    public static String getChannel(Context context){
-        return ManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL");
+    public static String getChannel(Context context) {
+        String channel = ManifestDataUtil.getAppMetaData(context, "UMENG_CHANNEL");
+        if ("huawei".equalsIgnoreCase(channel)) {
+            String deviceModel = Build.BRAND;
+            if ("honor".equalsIgnoreCase(deviceModel)) {
+                return "honor";
+            }
+        }
+        return channel;
     }
 
-    public static boolean isHuaWeiChannel(Context context){
+    public static boolean isHuaWeiChannel(Context context) {
         return "huawei".equalsIgnoreCase(getChannel(context));
     }
 
-    public static boolean isOppoChannel(Context context){
+    public static boolean isOppoChannel(Context context) {
         return "oppo".equalsIgnoreCase(getChannel(context));
     }
 
-    public static boolean isVIVOChannel(Context context){
+    public static boolean isVIVOChannel(Context context) {
         return "vivo".equalsIgnoreCase(getChannel(context));
     }
 
diff --git a/library-push/src/androidTest/java/com/yeshi/ec/push/ExampleInstrumentedTest.java b/library-push/src/androidTest/java/com/yeshi/ec/push/ExampleInstrumentedTest.java
deleted file mode 100644
index 138b574..0000000
--- a/library-push/src/androidTest/java/com/yeshi/ec/push/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.yeshi.ec.push;
-
-import android.content.Context;
-import androidx.test.platform.app.InstrumentationRegistry;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
-    @Test
-    public void useAppContext() {
-        // Context of the app under test.
-        Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
-        assertEquals("com.yeshi.ec.library_push.test", appContext.getPackageName());
-    }
-}
\ No newline at end of file
diff --git a/library-push/src/test/java/com/yeshi/ec/push/ExampleUnitTest.java b/library-push/src/test/java/com/yeshi/ec/push/ExampleUnitTest.java
deleted file mode 100644
index 6f25294..0000000
--- a/library-push/src/test/java/com/yeshi/ec/push/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.yeshi.ec.push;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
- */
-public class ExampleUnitTest {
-    @Test
-    public void addition_isCorrect() {
-        assertEquals(4, 2 + 2);
-    }
-}
\ No newline at end of file

--
Gitblit v1.8.0