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/ui/main/MainActivity.java |  112 +++++++++++--------------------------------------------
 1 files changed, 23 insertions(+), 89 deletions(-)

diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java
index 97edd23..9fa5a34 100644
--- a/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java
+++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java
@@ -21,11 +21,8 @@
 import android.support.v4.content.Loader;
 import android.view.KeyEvent;
 import android.view.View;
-import android.view.Window;
-import android.view.WindowManager;
 import android.widget.FrameLayout;
 import android.widget.ImageView;
-import android.widget.LinearLayout;
 import android.widget.RadioButton;
 import android.widget.RadioGroup;
 import android.widget.TextView;
@@ -38,8 +35,10 @@
 import com.google.gson.Gson;
 import com.google.gson.GsonBuilder;
 import com.google.gson.reflect.TypeToken;
+import com.huawei.secure.android.common.util.ScreenUtil;
 import com.lcjian.library.util.FragmentSwitchHelper;
 import com.lcjian.library.util.MarketUtils;
+import com.lcjian.library.util.common.ClipboardUtil;
 import com.lcjian.library.util.common.StringUtils;
 import com.mozillaonline.providers.downloads.DownloadService;
 import com.qq.e.ads.cfg.VideoOption;
@@ -50,27 +49,36 @@
 import com.umeng.socialize.media.UMImage;
 import com.weikou.beibeivideo.BasicTextHttpResponseHandler;
 import com.weikou.beibeivideo.BeibeiVideoAPI;
-import com.weikou.beibeivideo.BeibeiVideoApplication;
 import com.weikou.beibeivideo.R;
 import com.weikou.beibeivideo.db.MessageTable;
+import com.weikou.beibeivideo.entity.JumpDetail;
 import com.weikou.beibeivideo.entity.NewComment;
 import com.weikou.beibeivideo.entity.VideoInfo;
+import com.weikou.beibeivideo.entity.ad.ExpressAdContainer;
+import com.weikou.beibeivideo.entity.ad.RewardVideoAdContainer;
 import com.weikou.beibeivideo.ui.BaseActivity;
 import com.weikou.beibeivideo.ui.baidu.BaiDuNewsFragment;
 import com.weikou.beibeivideo.ui.baidu.BaiDuVideosFragment;
-import com.weikou.beibeivideo.ui.dialog.LoadingDialogUtil;
 import com.weikou.beibeivideo.ui.login.LoginActivity;
 import com.weikou.beibeivideo.ui.login.PersonInfoActivity;
-import com.weikou.beibeivideo.ui.login.PhoneLoginActivity;
 import com.weikou.beibeivideo.ui.media.VideoDetailActivity2;
 import com.weikou.beibeivideo.ui.mine.BrowserActivity;
 import com.weikou.beibeivideo.ui.mine.SystemMessageActivity;
 import com.weikou.beibeivideo.ui.mine.WatchHistoryActivity;
+import com.weikou.beibeivideo.ui.push.PushOpenClickActivity;
 import com.weikou.beibeivideo.ui.recommend.SearchActivity;
+import com.weikou.beibeivideo.util.AlibcTradeUtil;
 import com.weikou.beibeivideo.util.BeibeiConstant;
+import com.weikou.beibeivideo.util.DimenUtils;
 import com.weikou.beibeivideo.util.ExitDialog;
+import com.weikou.beibeivideo.util.JumpActivityUtil;
 import com.weikou.beibeivideo.util.LoginFirstDialog;
+import com.weikou.beibeivideo.util.UserUtil;
+import com.weikou.beibeivideo.util.ad.AdUtil;
+import com.weikou.beibeivideo.util.ad.RewardVideoAdManager;
 import com.weikou.beibeivideo.util.ad.manager.SearchResultAdManager;
+import com.weikou.beibeivideo.util.browser.BWJavaInterface;
+import com.weikou.beibeivideo.util.ui.TopStatusSettings;
 import com.yeshi.appupdate.AppUpdate;
 
 import org.apache.http.Header;
@@ -126,39 +134,12 @@
 
         exitDialog = exitDialogBuilder.create();
         exitDialog.setCanceledOnTouchOutside(true);
-        /*
-         * 璁$畻鐘舵�佹爮楂樺害骞惰缃�
-         */
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
-            Window window = getWindow();
-            window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
-                    WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
-            int result = 0;
-            int resourceId = getResources().getIdentifier("status_bar_height",
-                    "dimen", "android");
-            if (resourceId > 0) {
-                result = getResources().getDimensionPixelSize(resourceId);
-            }
-            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
-                    result);
-            findViewById(R.id.v_status_bar).setLayoutParams(params);
-            findViewById(R.id.v_status_bar).setVisibility(View.VISIBLE);
-        } else {
-            findViewById(R.id.v_status_bar).setVisibility(View.GONE);
-        }
+        TopStatusSettings.setStatusViewAndDeepColor(this);
         // 灏唅mei mac lat lng瀛樺叆sharedpreference涓�
         SharedPreferences mPre = getSharedPreferences("user",
                 Context.MODE_PRIVATE);
         WifiManager wifi = (WifiManager) this.getApplicationContext().getSystemService(Context.WIFI_SERVICE);
         WifiInfo info = wifi.getConnectionInfo();
-
-        Editor editor = mPre.edit();
-        if (StringUtils.isEmpty(getMacAddress())) {
-            editor.putString("mac", info.getMacAddress());
-        } else {
-            editor.putString("mac", getMacAddress());
-        }
-        editor.commit();
 
         tv_search = findViewById(R.id.tv_activity_main_search);
 
@@ -182,26 +163,7 @@
         iv_taobao.setOnClickListener(this);
         iv_red_dot = findViewById(R.id.iv_red_dot);
         fl_right_ad = findViewById(R.id.fl_right_ad);
-
-        /*
-         * 璁$畻鐘舵�佹爮楂樺害骞惰缃�
-         */
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
-            Window window = getWindow();
-            window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
-                    WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
-            int result = 0;
-            int resourceId = getResources().getIdentifier("status_bar_height",
-                    "dimen", "android");
-            if (resourceId > 0) {
-                result = getResources().getDimensionPixelSize(resourceId);
-            }
-            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
-                    result);
-            findViewById(R.id.v_status_bar).setLayoutParams(params);
-        } else {
-            findViewById(R.id.v_status_bar).setVisibility(View.GONE);
-        }
+        TopStatusSettings.setStatusViewAndDeepColor(this);
 
         initialer.run();
 
@@ -261,14 +223,15 @@
                     VideoInfo videoInfo = new VideoInfo();
                     videoInfo.setId("8065880");
                     videoInfo.setThirdType("0");
-                    Intent intent = new Intent(MainActivity.this, VideoDetailActivity2.class);
-                    intent.putExtra("video_info",videoInfo);
+                    Intent intent = new Intent(MainActivity.this, SearchActivity.class);
+                    intent.putExtra("video_info", videoInfo);
                     startActivity(intent);
                 }
-            },2000);
+            }, 2000);
         }
 
-//        startActivity(new Intent(this, PhoneLoginActivity.class));
+        //鎷夊彇璇︽儏闂
+        UserUtil.updateUserInfo(getApplicationContext(), null);
     }
 
 
@@ -381,6 +344,8 @@
             addDownloadBuxin(preferences.getString("shopurl", ""));
         }
         EventBus.getDefault().register(this);
+
+        PushOpenClickActivity.resumeJumpActivity(this);
     }
 
 
@@ -430,37 +395,6 @@
         EventBus.getDefault().unregister(this);
     }
 
-    /*
-     * ****************************************************************
-     * 瀛愬嚱鏁帮細鑾峰緱鏈湴MAC鍦板潃
-     * ****************************************************************
-     */
-    private String getMacAddress() {
-        String result = "";
-        String Mac = "";
-        result = callCmd("busybox ifconfig", "HWaddr");
-
-        // 濡傛灉杩斿洖鐨剅esult == null锛屽垯璇存槑缃戠粶涓嶅彲鍙�
-        if (result == null) {
-            return "缃戠粶鍑洪敊锛岃妫�鏌ョ綉缁�";
-        }
-
-        // 瀵硅琛屾暟鎹繘琛岃В鏋�
-        // 渚嬪锛歟th0 Link encap:Ethernet HWaddr 00:16:E8:3E:DF:67
-        if (result.length() > 0 && result.contains("HWaddr") == true) {
-            Mac = result.substring(result.indexOf("HWaddr") + 6,
-                    result.length() - 1);
-            if (Mac.length() > 1) {
-                Mac = Mac.replaceAll(" ", "");
-                result = "";
-                String[] tmp = Mac.split(":");
-                for (int i = 0; i < tmp.length; ++i) {
-                    result += tmp[i];
-                }
-            }
-        }
-        return result;
-    }
 
     private String callCmd(String cmd, String filter) {
         String result = "";

--
Gitblit v1.8.0