diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 385f7132d..802d8f29a 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -736,6 +736,10 @@ public class LiveAudienceActivity extends LiveActivity { if (liveBean == null) { return; } + if(MicStatusManager.getInstance().isMic()){ + MicStatusManager.getInstance().showDownMicDialog(mContext); + return; + } EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)).setLiveEnd(true)); }); } diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java index c2b77e8ea..26e884bc9 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java @@ -240,6 +240,10 @@ public class LiveHDDialogFragment extends AbsDialogFragment { if (liveBean == null) { return; } + if(MicStatusManager.getInstance().isMic()){ + MicStatusManager.getInstance().showDownMicDialog(mContext); + return; + } EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)).setLiveEnd(true)); } }); diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java index 1a1b9d0e0..5f819d406 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveUserDialogFragment.java @@ -39,6 +39,7 @@ import com.yunbao.common.http.HttpCallback; import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.utils.CommonIconUtil; import com.yunbao.common.utils.DialogUitl; +import com.yunbao.common.utils.MicStatusManager; import com.yunbao.common.utils.NobleUtil; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.SVGAViewUtils; @@ -619,6 +620,10 @@ public class LiveUserDialogFragment extends AbsDialogFragment implements View.On if (liveBean == null) { return; } + if(MicStatusManager.getInstance().isMic()){ + MicStatusManager.getInstance().showDownMicDialog(mContext); + return; + } EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)).setLiveEnd(true)); } }); diff --git a/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java index e02cdd9e6..8215d9fd9 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java @@ -26,6 +26,7 @@ import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.main.MainNetManager; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; +import com.yunbao.common.utils.MicStatusManager; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.StringUtil; import com.yunbao.common.views.AbsViewHolder; @@ -330,6 +331,10 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList if (liveBean == null) { return; } + if(MicStatusManager.getInstance().isMic()){ + MicStatusManager.getInstance().showDownMicDialog(mContext); + return; + } EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)).setLiveEnd(true)); } }); diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index e2fb874c9..2207486a3 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -3574,6 +3574,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis .setMicIng(2) .setBean(liveBean).setLiveType(liveType).setLiveTypeVal(Integer.parseInt(liveTypeVal))); } else { + if(MicStatusManager.getInstance().isMic()){ + MicStatusManager.getInstance().showDownMicDialog(mContext); + return; + } EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal))); } } diff --git a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java index fdb3e21cf..7130d9fd6 100644 --- a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity.java @@ -47,6 +47,7 @@ import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.JavascriptInterfaceUtils; import com.yunbao.common.utils.L; +import com.yunbao.common.utils.MicStatusManager; import com.yunbao.common.utils.ProcessImageUtil; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; @@ -259,6 +260,10 @@ public class MyWebViewActivity extends AbsActivity { } if (!"".endsWith(Constants.mStream)) { finish(); + if(MicStatusManager.getInstance().isMic()){ + MicStatusManager.getInstance().showDownMicDialog(mContext); + return; + } EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal))); } else { RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); diff --git a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity2.java b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity2.java index bc6ff64b0..22fe286e2 100644 --- a/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity2.java +++ b/main/src/main/java/com/yunbao/main/activity/MyWebViewActivity2.java @@ -35,6 +35,7 @@ import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.JavascriptInterfaceUtils; import com.yunbao.common.utils.L; +import com.yunbao.common.utils.MicStatusManager; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; @@ -236,6 +237,10 @@ public class MyWebViewActivity2 extends AbsActivity { } if (!"".endsWith(Constants.mStream)) { finish(); + if(MicStatusManager.getInstance().isMic()){ + MicStatusManager.getInstance().showDownMicDialog(mContext); + return; + } EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal))); } else { RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java index eadb8fe0c..2339e012c 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java @@ -34,6 +34,7 @@ import com.yunbao.common.custom.ItemDecoration; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.utils.DialogUitl; +import com.yunbao.common.utils.MicStatusManager; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.views.CustomViewHolder; @@ -416,6 +417,10 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement LiveRoomViewHolder.mHandler.removeCallbacksAndMessages(null); } if (!"".endsWith(Constants.mStream)) { + if(MicStatusManager.getInstance().isMic()){ + MicStatusManager.getInstance().showDownMicDialog(mContext); + return; + } EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal))); } else { RouteUtil.forwardLiveAudienceActivity(liveBean, liveType, Integer.parseInt(liveTypeVal), Integer.parseInt(liveSdk)); diff --git a/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder2.java b/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder2.java index 67d4ed4ec..b2551ec5f 100644 --- a/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder2.java +++ b/main/src/main/java/com/yunbao/main/views/UserHomeViewHolder2.java @@ -44,6 +44,7 @@ import com.yunbao.common.http.HttpCallback; import com.yunbao.common.utils.CommonIconUtil; import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DpUtil; +import com.yunbao.common.utils.MicStatusManager; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.SVGAViewUtils; import com.yunbao.common.utils.StringUtil; @@ -774,6 +775,10 @@ public class UserHomeViewHolder2 extends AbsLivePageViewHolder implements LiveSh public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) { if (mFromLiveRoom) { + if(MicStatusManager.getInstance().isMic()){ + MicStatusManager.getInstance().showDownMicDialog(mContext); + return; + } ((UserHomeActivity) mContext).onBackPressed(); EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal))); } else {