From 6654fe0434a2fa8c5c80926628230515fb92b9cb Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Fri, 18 Nov 2022 10:34:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/live/views/LiveAudienceViewHolder.java | 8 ++++---- .../yunbao/main/views/MainHomeCommunityViewHolder.java | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java index dbf1ef8f5..c53815940 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java @@ -313,9 +313,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { if (mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) { //按下 handler.postDelayed(mLongPressed, 500); - if (voiceDialog == null) { - voiceDialog = new VoiceDialog(); - } + } else { mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() { @Override @@ -372,7 +370,9 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { Vibrator vibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE); vibrator.vibrate(100);//震动时间(ms) - + if (voiceDialog == null) { + voiceDialog = new VoiceDialog(); + } voiceDialog.setListener(new VoiceDialog.VoiceListener() { @Override public void timeout() { diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java index c2eaf1187..eb76f5283 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeCommunityViewHolder.java @@ -346,6 +346,10 @@ public class MainHomeCommunityViewHolder extends AbsMainHomeChildViewHolder impl } else if (TextUtils.equals(event.getMethod(), "androidMethodLookToLive")) { //看直播 gotoLive(event.getLiveId()); + }else if (TextUtils.equals(event.getMethod(), "isCloseNavigation")){ + if(nowMainActivity!=null) { + nowMainActivity.isClose(event.getIsClose()); + } } } }