From 8730a6396ff4aa8a2261d086573333d52b41e7aa Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 9 Jan 2023 14:38:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=99=E4=BD=93=E6=B6=88=E6=81=AF=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8A=A8=E7=94=BB=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.gradle | 4 ++-- .../com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java | 5 +++-- .../main/java/com/yunbao/live/views/PortraitLiveManager.java | 4 ++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/config.gradle b/config.gradle index 7bd22a5fb..b123cc49e 100644 --- a/config.gradle +++ b/config.gradle @@ -10,9 +10,9 @@ ext { manifestPlaceholders = [ //正式 -// serverHost : "https://napi.yaoulive.com", + serverHost : "https://napi.yaoulive.com", // - serverHost : "https://ceshi.yaoulive.com", +// serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java index 84452cf21..7bffad25e 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -305,7 +305,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { int i = 0; private void nextPkTimeCountDown() { - Log.i("vvvs", "mHandler:" + (mHandler != null) ); + Log.i("vvvs", "mHandler:" + (mHandler != null)); if (mHandler != null) { mHandler.sendEmptyMessageAtTime(WHAT_PK_TIME, getNextSecondTime()); } @@ -384,7 +384,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { * pk时间倒计时 */ private void changePkTime() { - if (mPkTimeCount<0)return; + if (mPkTimeCount < 0) return; mPkTimeCount--; Log.i("vvvs", "mPkTimeCount:" + mPkTimeCount); if (mPkTimeCount >= 0) {// @@ -2164,6 +2164,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { mHandler.removeCallbacksAndMessages(null); } mSocketRyClient = null; + mHandler = null; if (mLiveLinkMicPkViewHolder != null) { mLiveLinkMicPkViewHolder.release(); } diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 205c5ba47..395524312 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -291,6 +291,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveLinkMicPresenter.setLiveSdk(mLiveSDK); mLiveLinkMicAnchorPresenter.setLiveSdk(mLiveSDK); } + if (mLiveRyLinkMicPkPresenter==null){ + mLiveRyLinkMicPkPresenter = new LiveRyLinkMicPkPresenter(mContext, mLivePlayViewHolder, false, null); + } //去除主播离开画面 if (LivePlayKsyViewHolder.leave != null) { LivePlayKsyViewHolder.leave.setVisibility(View.GONE); @@ -681,6 +684,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe if (mLiveRyLinkMicPkPresenter != null) { mLiveRyLinkMicPkPresenter.clearData(); mLiveRyLinkMicPkPresenter.release(); + mLiveRyLinkMicPkPresenter = null; } if (isQuit) { isQuitF = true;