Commit ecf81cbe94607ce021d5dab33dcb207b18867a70

Authored by 袁思汶
1 parent befbb28b

音视频通话中页面关闭

build.gradle
... ... @@ -60,7 +60,7 @@ ext {
60 60 qmui = '1.1.5'
61 61  
62 62 libLargeImage = '1.0.4-androidx'
63   - libBase = '2.0.3.8'
  63 + libBase = '2.0.6.5'
64 64  
65 65 //阿里路由框架
66 66 arouterApiVersion = '1.5.0'
... ...
config.gradle
... ... @@ -21,7 +21,7 @@ ext {
21 21 //编译方式
22 22 debug : false,
23 23 //版本号
24   - version: "1.1.5.2",
  24 + version: "1.1.5.3",
25 25 //Lib库前缀
26 26 packeg : "com.cnlive.media",
27 27 //Lib库名称
... ...
lib_media/src/main/java/com/cnlive/media/ui/activity/RecordActivity.java
... ... @@ -13,7 +13,8 @@ import androidx.annotation.NonNull;
13 13 import androidx.fragment.app.Fragment;
14 14  
15 15 import com.cnlive.libs.base.frame.activity.MvpBindingActivity;
16   -import com.cnlive.libs.base.util.StatusBarUtil2;
  16 +import com.cnlive.libs.base.observable.NotifyTrtcAnswerObservable;
  17 +import com.cnlive.libs.base.util.AlertUtil;
17 18 import com.cnlive.media.PickerConfig;
18 19 import com.cnlive.media.R;
19 20 import com.cnlive.media.databinding.ActivityRecordBinding;
... ... @@ -78,6 +79,7 @@ public class RecordActivity extends MvpBindingActivity<RecordView, RecordPresent
78 79 //设置全屏,不延伸到刘海屏
79 80 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
80 81 if (getSupportActionBar() != null) getSupportActionBar().hide();
  82 + NotifyTrtcAnswerObservable.newInstance().addObserver(this);
81 83 QiniuVideoUtil.chcekInitState(this, state -> {
82 84 if (state == 0) {
83 85 getMvpView().showMessage("功能维护中");
... ... @@ -190,6 +192,7 @@ public class RecordActivity extends MvpBindingActivity<RecordView, RecordPresent
190 192 protected void onDestroy() {
191 193 super.onDestroy();
192 194 MeidaResultObservable.getInstance().deleteObserver(this);
  195 + NotifyTrtcAnswerObservable.newInstance().deleteObserver(this);
193 196 if (preBitmap != null) {
194 197 // glide 加载维护了 bitmap 回收
195 198 // if (!preBitmap.isRecycled()){
... ... @@ -216,6 +219,9 @@ public class RecordActivity extends MvpBindingActivity<RecordView, RecordPresent
216 219 } else {
217 220 finish();
218 221 }
  222 + } else if (o instanceof NotifyTrtcAnswerObservable) {
  223 + AlertUtil.showDeftToast(this, "通话已接通,待通话结束再进入。");
  224 + finish();
219 225 }
220 226  
221 227 }
... ...