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 | 60 +++++++++++++++--------------------------------------------- 1 files changed, 15 insertions(+), 45 deletions(-) diff --git a/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java b/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java index de45140..9fa5a34 100644 --- a/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java +++ b/BuWanVideo/src/com/weikou/beibeivideo/ui/main/MainActivity.java @@ -35,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; @@ -49,8 +51,11 @@ import com.weikou.beibeivideo.BeibeiVideoAPI; 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; @@ -62,11 +67,18 @@ 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; @@ -122,24 +134,13 @@ exitDialog = exitDialogBuilder.create(); exitDialog.setCanceledOnTouchOutside(true); - initStatusBar(); + 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(); - try { - Editor editor = mPre.edit(); - if (StringUtils.isEmpty(getMacAddress())) { - editor.putString("mac", info.getMacAddress()); - } else { - editor.putString("mac", getMacAddress()); - } - editor.commit(); - } catch (Exception e) { - - } tv_search = findViewById(R.id.tv_activity_main_search); iv_msg_dot = findViewById(R.id.iv_msg_dot); @@ -162,7 +163,7 @@ iv_taobao.setOnClickListener(this); iv_red_dot = findViewById(R.id.iv_red_dot); fl_right_ad = findViewById(R.id.fl_right_ad); - initStatusBar(); + TopStatusSettings.setStatusViewAndDeepColor(this); initialer.run(); @@ -222,7 +223,7 @@ VideoInfo videoInfo = new VideoInfo(); videoInfo.setId("8065880"); videoInfo.setThirdType("0"); - Intent intent = new Intent(MainActivity.this, VideoDetailActivity2.class); + Intent intent = new Intent(MainActivity.this, SearchActivity.class); intent.putExtra("video_info", videoInfo); startActivity(intent); } @@ -394,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