Commit d6b0bb70 by 万齐军

Merge branch 'feat/qj/confide_optimize' into 'd/v_confide_optimized'

Feat/qj/confide optimize

See merge request app_android_lib/YDL-Component!202
parents 8cefa85d 476be0fd
......@@ -12,6 +12,7 @@
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<application
android:name=".base.ComponentTestApp"
......
......@@ -34,7 +34,6 @@ import com.yidianling.muse.event.MeditationFloatEvent
import com.yidianling.muse.helper.MediaPlayerManager
import com.yidianling.muse.service.MeditationWindowService
import com.yidianling.tests.home.NewTestHomeActivity
import com.yidianling.user.StatusUtils
import com.yidianling.user.api.service.IUserService
import com.yidianling.user.ui.collect.CollectSexAndBirthActivity
import com.yidianling.user.ui.login.OneKeyLoginHelp
......@@ -96,7 +95,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
bindService()
bindMeditationService()
reLoadData()
// reLoadData()
requestPermission()
bt_mdt.setOnClickListener {
val intent = Intent(this, MDTLoginActivity::class.java)
......
......@@ -10,7 +10,6 @@ import android.os.Process
import android.util.Log
import androidx.annotation.RequiresApi
import com.channel.ydl_flutter_base.plugin.YDLCommonPlugin
import com.facebook.stetho.Stetho
import com.meituan.android.walle.WalleChannelReader
import com.tencent.bugly.crashreport.CrashReport
import com.tencent.smtt.sdk.QbSdk
......@@ -88,7 +87,6 @@ class DemoAppLifecycles : IAppLifecycles {
}
// application.registerActivityLifecycleCallbacks(new CoursePlayLifecycle());
Stetho.initializeWithDefaults(application)
}
}
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<LinearLayout
......@@ -229,8 +228,9 @@
</LinearLayout>
<com.ydl.ydlcommon.mvp.lce.view.YDLStateView
android:id="@+id/lce_state_view"
android:layout_width="match_parent"
android:layout_height="30dp" />
android:id="@+id/lce_state_view"
android:layout_width="match_parent"
android:layout_height="30dp"
android:visibility="gone" />
</LinearLayout>
\ No newline at end of file
......@@ -188,8 +188,6 @@ ext {
//删除集成调试库,其功能合并到umeng基础组件库。
//"umeng-debug" : "com.umeng.sdk:debug:1.0.0",
"tablayout" : "com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar",
"stetho" : "com.facebook.stetho:stetho:1.5.0",
"stetho-okhttp3" : "com.facebook.stetho:stetho-okhttp3:1.4.1",
"aspectjrt" : "org.aspectj:aspectjrt:1.8.9",
"bugly-crashreport" : "com.tencent.bugly:crashreport:2.8.6.0",
"bugly-nativecrashreport" : "com.tencent.bugly:nativecrashreport:3.6.0.1",
......
......@@ -231,6 +231,8 @@ class AudioHomeActivity :
private var canChangeRoute: Boolean = false
private var hasHandleRefused = false
private val notificationCallback = object : IMRegisterObserverCustomNotificationCallBack {
override fun onObserverCustomNotification(fromUid: String, toUid: String, content: String) {
if (fromUid == listenerUid) {
......@@ -240,18 +242,10 @@ class AudioHomeActivity :
"2" -> {//接受
runOnUiThread {
joinChannel()
onPeerAccepted()
}
}
"4" -> {//拒绝
runOnUiThread {
ToastUtil.toastShort("对方已挂断")
writeAgoraLog("被叫(专家)拒绝了通话邀请")
//通话结束或挂断时,上传日志文件
uploadLog()
leaveChannel()
uploadExceptionStatus("对方已拒绝", 2)
}
onCallRefused()
}
}
} catch (throwable: Throwable) {
......@@ -261,6 +255,20 @@ class AudioHomeActivity :
}
}
fun onCallRefused() {
runOnUiThread {
if (hasHandleRefused) return@runOnUiThread
hasHandleRefused = true
YDLavManager.instances.callEndStatusUpdate(channelId ?: "", 2, "被叫拒绝")
ToastUtil.toastShort("对方已挂断")
writeAgoraLog("被叫(专家)拒绝了通话邀请")
//通话结束或挂断时,上传日志文件
uploadLog()
leaveChannel()
uploadExceptionStatus("对方已拒绝", 2)
}
}
/**
* 声网事件回调 (SDK 通过指定的事件通知应用程序 SDK 的运行事件,如: 加入或离开频道,新用户加入频道等)
*/
......
......@@ -30,8 +30,6 @@ import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.utils.log.AliYunLogConfig
import com.ydl.ydlcommon.utils.log.AliYunRichLogsHelper
import com.ydl.ydlcommon.utils.log.LogHelper
import com.yidianling.common.tools.ToastUtil
import com.yidianling.im.api.bean.IMRegisterObserverCustomNotificationCallBack
import com.yidianling.im.api.bean.IMSendCustomNotificationResultCallBack
import com.yidianling.user.api.event.UserLoginEvent
import com.yidianling.user.api.event.UserLogoutEvent
......@@ -139,15 +137,7 @@ class YDLavManager {
onConfideEvent(dimension, response?.ChannelId)
val act = ActivityManager.getInstance().getTopTaskActivity()
if (act is AudioHomeActivity) {
act.runOnUiThread {
callEndStatusUpdate(response?.ChannelId!!, 2, "被叫拒绝")
ToastUtil.toastShort("对方已挂断")
act.writeAgoraLog("被叫(专家)拒绝了通话邀请")
//通话结束或挂断时,上传日志文件
act.uploadLog()
act.leaveChannel()
act.uploadExceptionStatus("对方已拒绝", 2)
}
act.onCallRefused()
}
}
......@@ -316,16 +306,6 @@ class YDLavManager {
}
}
})
AudioImIn.registerObserveCustomNotification(object :
IMRegisterObserverCustomNotificationCallBack {
override fun onObserverCustomNotification(
fromUid: String,
toUid: String,
content: String
) {
}
})
}
fun rtcCall(listenerUid: String?, channelId: String?, sendDoctocrMsg: String?) {
......
......@@ -151,8 +151,6 @@ dependencies {
api rootProject.ext.dependencies["umeng-shareboard"]
api rootProject.ext.dependencies["umeng-wx-guanfang"]
api rootProject.ext.dependencies["umeng-qq-guanfang"]
api rootProject.ext.dependencies["stetho"]
api rootProject.ext.dependencies["stetho-okhttp3"]
api rootProject.ext.dependencies["bugly-crashreport"]
api rootProject.ext.dependencies["bugly-nativecrashreport"]
api rootProject.ext.dependencies["arouter-api"]
......
......@@ -3,7 +3,6 @@ package com.ydl.ydlcommon.base.config
import android.annotation.SuppressLint
import android.content.Context
import android.text.TextUtils
import com.facebook.stetho.okhttp3.StethoInterceptor
import com.google.gson.Gson
import com.ydl.pushserver.pushagent.YdlPushAgent
import com.ydl.ydlcommon.app.Apm
......@@ -133,9 +132,7 @@ class HttpConfig {
//获取证书
val cerInputStream = context.resources.openRawResource(com.ydl.ydlcommon.R.raw.ydl_trust);
val builder = OkHttpConfig.Builder(context)
if (appDebug) {
builder.setNetInterceptor(StethoInterceptor())
} else {
if (!appDebug) {
//使用预埋证书,校验服务端证书
builder.setSslSocketFactory(cerInputStream)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment