From 00db8a00c77ecff6b3f8328616efa69353f9dbf7 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 22 Sep 2023 11:05:02 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E5=8F=8D=E9=A6=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/yunbao/common/manager/OpenAdManager.java | 3 +++ .../main/java/com/yunbao/common/utils/PluginManager.java | 1 + config.gradle | 3 ++- .../java/com/yunbao/live/utils/LiveExoPlayerManager.java | 6 +++++- .../java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java | 2 +- .../java/com/yunbao/live/views/LivePushRyViewHolder.java | 2 ++ 6 files changed, 14 insertions(+), 3 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java index 4003b6a17..b9e967df9 100644 --- a/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java +++ b/common/src/main/java/com/yunbao/common/manager/OpenAdManager.java @@ -52,6 +52,9 @@ public class OpenAdManager { if (list != null && list.isEmpty()) { return; } + if(CommonAppContext.getTopActivity()==null){ + return; + } LiveNetManager.get(CommonAppContext.getTopActivity()) .activityPopup(new HttpCallback>() { @Override diff --git a/common/src/main/java/com/yunbao/common/utils/PluginManager.java b/common/src/main/java/com/yunbao/common/utils/PluginManager.java index 395dbee7c..fc0ef13cf 100644 --- a/common/src/main/java/com/yunbao/common/utils/PluginManager.java +++ b/common/src/main/java/com/yunbao/common/utils/PluginManager.java @@ -143,6 +143,7 @@ public class PluginManager { private void loadSo(File dir, String file) { file += ".so"; if (new File(dir.getAbsolutePath() + File.separator + file).exists()) { + Log.d(TAG, "加载 " + dir.getAbsolutePath() + File.separator + file); System.load(dir + File.separator + file); Log.d(TAG, "加载成功 " + dir + File.separator + file); } else { diff --git a/config.gradle b/config.gradle index 3e1349d45..3de4f1582 100644 --- a/config.gradle +++ b/config.gradle @@ -26,5 +26,6 @@ ext { //是否上报异常日志 isUploadLog : true, //是否打包成插件包模式 - isPluginModel : true, ] + isPluginModel : false, + ] } diff --git a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java index e3236c88a..e68e8434b 100644 --- a/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java +++ b/live/src/main/java/com/yunbao/live/utils/LiveExoPlayerManager.java @@ -68,7 +68,7 @@ public class LiveExoPlayerManager { handler = new Handler(Looper.getMainLooper()); setListener(); setAnalyticsListener(); - //createDeBugDialog(); + // createDeBugDialog(); } @@ -474,6 +474,10 @@ public class LiveExoPlayerManager { if (getNextPlayer() != null && getNextPlayer().isPlaying()) { getNextPlayer().stop(); } + if (task != null) { + task.cancel(); + task = null; + } clearUrl(); } diff --git a/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java index 4be20f372..2d523138a 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveLinkMicPkViewHolder.java @@ -157,7 +157,7 @@ public class LiveLinkMicPkViewHolder extends AbsViewHolder { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { Log.i("女神说", "倒计时状态:" + s); - if (mTime.getVisibility() == View.VISIBLE) { + if (mTime.getVisibility() == View.VISIBLE && !s.toString().contains(mContext.getString(R.string.live_pk_time_2))) { EventBus.getDefault().post(new LiveAudienceEvent() .setType(LiveAudienceEvent.LiveAudienceType.LIVE_PK_ING)); } diff --git a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java index 0551f721f..37aca3580 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePushRyViewHolder.java @@ -498,6 +498,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX DialogUitl.showSimpleDialog(mContext,WordUtil.isNewZh()? "是否要斷開連麥?":"Do you want to disconnect Link?", new DialogUitl.SimpleCallback() { @Override public void onConfirmClick(Dialog dialog, String content) { + Log.i("PK----->", "updateSub: "+isPk+"|"); aheadOfScheduleEndPK(mPkUid, CommonAppConfig.getInstance().getUserBean().getUserNiceName(), (String) tv_avatarOther_name.getTag()); //断开连麦 LiveRyAnchorActivity.isDRPK = 0; @@ -1056,5 +1057,6 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX } else if (event.getType() == LIVE_PK_ING) { isPk = true; } + Log.i("PK----->", "updateSub: "+isPk+"|"+event.getType()); } }