File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
app/src/main/java/com/mean/meanchateasemobapi Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ public void onBigExpressionClicked(EaseEmojicon emojicon) {
178
178
179
179
@ Override
180
180
public boolean onPressToSpeakBtnTouch (View v , MotionEvent event ) {
181
- if (PermissionChecker .checkCameraPermission (ChatActivity .this )) {
181
+ if (PermissionChecker .checkRecordAudioPermission (ChatActivity .this )) {
182
182
return voiceRecorderView .onPressToSpeakBtnTouch (v , event , new EaseVoiceRecorderView .EaseVoiceRecorderCallback () {
183
183
@ Override
184
184
public void onVoiceRecordComplete (String voiceFilePath , int voiceTimeLength ) {
@@ -376,6 +376,10 @@ public void onMessageInProgress(EMMessage message) {
376
376
protected void initConversation (){
377
377
conversation = EMClient .getInstance ().chatManager ()
378
378
.getConversation (toChatUsername , EMConversation .EMConversationType .Chat , true );
379
+ if (conversation == null ){
380
+ showToast ("聊天初始化失败" );
381
+ finish ();
382
+ }
379
383
conversation .markAllMessagesAsRead ();
380
384
if (!isRoaming ) {
381
385
final List <EMMessage > msgs = conversation .getAllMessages ();
You can’t perform that action at this time.
0 commit comments