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()); + } } } }