From f60aeaa35e386395c07e4a5f2d073ebfe55799ee Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 28 Oct 2022 10:44:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dfirebase=E5=8F=8D=E9=A6=88?= =?UTF-8?q?=E7=9A=84SocketRyClient.mSocketHandler=E7=A9=BA=E6=8C=87?= =?UTF-8?q?=E9=92=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presenter/LiveRyLinkMicPkPresenter.java | 20 ++++++++--- .../yunbao/live/socket/SocketRyChatUtil.java | 36 ++++++++++++++----- 2 files changed, 42 insertions(+), 14 deletions(-) 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 0b7e0ee58..6cb178c5a 100644 --- a/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/LiveRyLinkMicPkPresenter.java @@ -962,7 +962,9 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onSuccess(io.rong.imlib.model.Message message) { Log.e("ry", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg1.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg1.mResult.toString() + ""); + } } @Override @@ -1002,7 +1004,9 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onSuccess(io.rong.imlib.model.Message message) { Log.e("ry", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg1.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg1.mResult.toString() + ""); + } } @Override @@ -1196,7 +1200,9 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onSuccess(io.rong.imlib.model.Message message) { Log.e("ry", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg1.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg1.mResult.toString() + ""); + } } @Override @@ -1289,7 +1295,9 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onSuccess(io.rong.imlib.model.Message message) { Log.e("ry", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg1.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg1.mResult.toString() + ""); + } } @Override @@ -1329,7 +1337,9 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener { @Override public void onSuccess(io.rong.imlib.model.Message message) { Log.e("ry", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg1.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg1.mResult.toString() + ""); + } } @Override diff --git a/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java b/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java index db030593c..eee39cd71 100644 --- a/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java +++ b/live/src/main/java/com/yunbao/live/socket/SocketRyChatUtil.java @@ -147,7 +147,9 @@ public class SocketRyChatUtil { logger.logEvent("FB_type_interaction"); AdjustEvent adjustEvent = new AdjustEvent("cs6j0s"); Adjust.trackEvent(adjustEvent); - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + } } @Override @@ -259,7 +261,9 @@ public class SocketRyChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + } } @Override @@ -389,7 +393,9 @@ public class SocketRyChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + } } @Override @@ -434,7 +440,9 @@ public class SocketRyChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + } } @Override @@ -479,7 +487,9 @@ public class SocketRyChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + } } @Override @@ -514,7 +524,9 @@ public class SocketRyChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + } } @Override @@ -592,7 +604,9 @@ public class SocketRyChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + } } @Override @@ -630,7 +644,9 @@ public class SocketRyChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + } } @Override @@ -732,7 +748,9 @@ public class SocketRyChatUtil { @Override public void onSuccess(Message message) { Log.i("tx", "发送成功"); - SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + if (SocketRyClient.mSocketHandler != null) { + SocketRyClient.mSocketHandler.processBroadcast(msg.mResult.toString() + ""); + } } @Override