Commit ecf81cbe94607ce021d5dab33dcb207b18867a70
1 parent
befbb28b
音视频通话中页面关闭
Showing
3 changed files
with
9 additions
and
3 deletions
build.gradle
| @@ -60,7 +60,7 @@ ext { | @@ -60,7 +60,7 @@ ext { | ||
| 60 | qmui = '1.1.5' | 60 | qmui = '1.1.5' |
| 61 | 61 | ||
| 62 | libLargeImage = '1.0.4-androidx' | 62 | libLargeImage = '1.0.4-androidx' |
| 63 | - libBase = '2.0.3.8' | 63 | + libBase = '2.0.6.5' |
| 64 | 64 | ||
| 65 | //阿里路由框架 | 65 | //阿里路由框架 |
| 66 | arouterApiVersion = '1.5.0' | 66 | arouterApiVersion = '1.5.0' |
config.gradle
lib_media/src/main/java/com/cnlive/media/ui/activity/RecordActivity.java
| @@ -13,7 +13,8 @@ import androidx.annotation.NonNull; | @@ -13,7 +13,8 @@ import androidx.annotation.NonNull; | ||
| 13 | import androidx.fragment.app.Fragment; | 13 | import androidx.fragment.app.Fragment; |
| 14 | 14 | ||
| 15 | import com.cnlive.libs.base.frame.activity.MvpBindingActivity; | 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 | import com.cnlive.media.PickerConfig; | 18 | import com.cnlive.media.PickerConfig; |
| 18 | import com.cnlive.media.R; | 19 | import com.cnlive.media.R; |
| 19 | import com.cnlive.media.databinding.ActivityRecordBinding; | 20 | import com.cnlive.media.databinding.ActivityRecordBinding; |
| @@ -78,6 +79,7 @@ public class RecordActivity extends MvpBindingActivity<RecordView, RecordPresent | @@ -78,6 +79,7 @@ public class RecordActivity extends MvpBindingActivity<RecordView, RecordPresent | ||
| 78 | //设置全屏,不延伸到刘海屏 | 79 | //设置全屏,不延伸到刘海屏 |
| 79 | getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); | 80 | getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); |
| 80 | if (getSupportActionBar() != null) getSupportActionBar().hide(); | 81 | if (getSupportActionBar() != null) getSupportActionBar().hide(); |
| 82 | + NotifyTrtcAnswerObservable.newInstance().addObserver(this); | ||
| 81 | QiniuVideoUtil.chcekInitState(this, state -> { | 83 | QiniuVideoUtil.chcekInitState(this, state -> { |
| 82 | if (state == 0) { | 84 | if (state == 0) { |
| 83 | getMvpView().showMessage("功能维护中"); | 85 | getMvpView().showMessage("功能维护中"); |
| @@ -190,6 +192,7 @@ public class RecordActivity extends MvpBindingActivity<RecordView, RecordPresent | @@ -190,6 +192,7 @@ public class RecordActivity extends MvpBindingActivity<RecordView, RecordPresent | ||
| 190 | protected void onDestroy() { | 192 | protected void onDestroy() { |
| 191 | super.onDestroy(); | 193 | super.onDestroy(); |
| 192 | MeidaResultObservable.getInstance().deleteObserver(this); | 194 | MeidaResultObservable.getInstance().deleteObserver(this); |
| 195 | + NotifyTrtcAnswerObservable.newInstance().deleteObserver(this); | ||
| 193 | if (preBitmap != null) { | 196 | if (preBitmap != null) { |
| 194 | // glide 加载维护了 bitmap 回收 | 197 | // glide 加载维护了 bitmap 回收 |
| 195 | // if (!preBitmap.isRecycled()){ | 198 | // if (!preBitmap.isRecycled()){ |
| @@ -216,6 +219,9 @@ public class RecordActivity extends MvpBindingActivity<RecordView, RecordPresent | @@ -216,6 +219,9 @@ public class RecordActivity extends MvpBindingActivity<RecordView, RecordPresent | ||
| 216 | } else { | 219 | } else { |
| 217 | finish(); | 220 | finish(); |
| 218 | } | 221 | } |
| 222 | + } else if (o instanceof NotifyTrtcAnswerObservable) { | ||
| 223 | + AlertUtil.showDeftToast(this, "通话已接通,待通话结束再进入。"); | ||
| 224 | + finish(); | ||
| 219 | } | 225 | } |
| 220 | 226 | ||
| 221 | } | 227 | } |