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;