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