Commit 50e89e04 by 严久程

Merge branch '声网通话流程优化' of…

Merge branch '声网通话流程优化' of ssh://gitlab.yidianling.com:2224/app_android_lib/YDL-Component into 声网通话流程优化

 Conflicts:
	config.gradle
parents 5e6c2d80 350d18f0
......@@ -185,35 +185,7 @@ class MainActivity : BaseLceActivity<DemoContract.View, DemoContract.Presenter>(
}
bt_to_privacy.setOnClickListener {
val dialog = SecretDescriptionDialog(this@MainActivity,
"感谢您信任并使用壹点灵旗下APP,\\n\n" +
"我们深知个人隐私的重要性,为了您更好的使用本APP,希望您着重关注:\\n\\n1. 为向您提供交易相关基本功能,我们会收集、使用必要的信息;\\n\n" +
"2. 基于您的明示授权,我们可能会获取您的位置(为您提供附近的咨询师等)、设备号信息(以保障您账号与交易安全)等信息,您有权拒绝或取消授权;\\n\n" +
"3. 我们会采业界先进的安全措施保护您的信息安全;\\n\n" +
"4. 未经您同意,我们不会从第三方处获取、共享或向其提供您的信息;\\n\n" +
"5. 您可以查询、更正、删除您的个人信息。",
object : SecretDescriptionDialog.OnSecretDescriptionDialogListener {
override fun onCancel() {
val secretDialog = SecretDialog(
this@MainActivity,
object : SecretDialog.OnSecretDialogListener {
override fun onCancel() {
ToastUtil.toastShort("onCancel")
}
override fun onSure() {
ToastUtil.toastShort("nextStep")
}
})
secretDialog?.show()
}
override fun onSure() {
ToastUtil.toastShort("nextStep")
}
}
)
dialog.show()
startActivity(Intent(this@MainActivity,TestAppActivity::class.java))
}
}
......
......@@ -8,9 +8,9 @@ ext {
"m-confide" : "0.0.48.51",
"m-consultant" : "0.0.59.10",
"m-fm" : "0.0.29.9",
"m-user" : "0.0.60.10",
"m-user" : "0.0.60.11",
"m-home" : "0.0.22.3",
"m-im" : "0.0.18.8",
"m-im" : "0.0.18.9",
"m-dynamic" : "0.0.7.7",
"m-article" : "0.0.0.5",
......@@ -39,7 +39,7 @@ ext {
"ydl-webview" : "0.0.38.32",
"ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.9",
"m-audioim" : "0.0.49.29",
"m-audioim" : "0.0.49.29.3",
"ydl-flutter-base": "0.0.14.14",
//以下 几乎不会动
......@@ -111,7 +111,7 @@ ext {
"m-tests-api" : "0.0.2",
"m-user-api" : "0.0.10.15",
"m-home-api" : "0.0.4.1",
"m-im-api" : "0.0.12.20",
"m-im-api" : "0.0.12.21",
"m-dynamic-api" : "0.0.3.7",
//-------------- 功能组件 --------------
......@@ -122,7 +122,7 @@ ext {
"ydl-webview" : "0.0.38.31",
"ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.9",
"m-audioim" : "0.0.49.29",
"m-audioim" : "0.0.49.29.3",
"ydl-flutter-base": "0.0.14.14",
//以下 几乎不会动
......
......@@ -346,37 +346,34 @@ class AudioHomeActivity :
runOnUiThread {
var status = -1
var netStatus = when (uid) {
listenerUid!!.toInt() -> {
0 -> {
if (txQuality in 1..2 && rxQuality in 1..2) {
""
} else if (txQuality >= 5 || rxQuality >= 5) {
"对方的网络已断开"
"的网络已断开"
} else {
status = if (txQuality >= 4 || rxQuality >= 4) {
0
} else {
1
}
"对方的网络状况不佳"
"的网络状况不佳"
}
}
0 -> {
else -> {
if (txQuality in 1..2 && rxQuality in 1..2) {
""
} else if (txQuality >= 5 || rxQuality >= 5) {
"的网络已断开"
"对方的网络已断开"
} else {
status = if (txQuality >= 4 || rxQuality >= 4) {
0
} else {
1
}
"的网络状况不佳"
"对方的网络状况不佳"
}
}
else -> {
""
}
}
showNetStatus(netStatus, status)
}
......@@ -618,7 +615,12 @@ class AudioHomeActivity :
waitDisposable =
Observable.interval(0, 100, TimeUnit.MILLISECONDS).subscribeOn(Schedulers.computation())
.take(600).observeOn(AndroidSchedulers.mainThread()).subscribe({
tv_change_time_counter.text = "${60 - it / 10}s"
val remainTime = 50 - it / 10
if (remainTime <= 0) {
waittingStatus()
} else {
tv_change_time_counter.text = "${remainTime}s"
}
var result = it.toFloat() / 2.5f
progress_view.setProgress(result)
if (result >= 100f && !iv_hang_up.isEnabled) {
......@@ -626,10 +628,11 @@ class AudioHomeActivity :
iv_hang_up.isEnabled = true
iv_hang_up.setImageResource(R.drawable.audioim_img_hang_up)
}
}, {
LogUtil.d(it.message)
}) {
waittingStatus()
// waittingStatus()
if (!isConnectSuccess) {
//关闭音乐
stopPlaying()
......@@ -646,7 +649,8 @@ class AudioHomeActivity :
//通话结束或挂断时,上传日志文件
uploadLog()
showChooseDialog(2)
showToast("对方手机暂时不在身边,请稍后再试")
userCloseCalling()
}
}
......@@ -823,12 +827,12 @@ class AudioHomeActivity :
//挂断按钮可点击
iv_hang_up.isEnabled = true
iv_hang_up.setImageResource(R.drawable.audioim_img_hang_up)
if (!isConnectSuccess) {
//页面等待文案调整
tv_waiting.visibility = View.GONE
tv_change_doctor.text = "对方暂无应答,正在为您切换线路重播"
tv_change_doctor.visibility = View.VISIBLE
}
// if (!isConnectSuccess) {
// //页面等待文案调整
// tv_waiting.visibility = View.GONE
// tv_change_doctor.text = "对方暂无应答,正在为您切换线路重播"
// tv_change_doctor.visibility = View.VISIBLE
// }
if (!isShowAXB) {
tv_change_route.visibility = View.GONE
} else {
......@@ -1086,8 +1090,7 @@ class AudioHomeActivity :
*/
private fun showNetStatus(msg: String, status: Int = 0) {
LogUtil.e("showNetStatus: msg=$msg,status=$status")
if (TextUtils.isEmpty(msg)&&status==-1){
//todo
if (tv_nte_status.visibility == View.VISIBLE) {
return
}
if (TextUtils.isEmpty(msg)) {
......@@ -1095,16 +1098,29 @@ class AudioHomeActivity :
} else {
tv_nte_status.text = msg
if (status == 0) {
tv_nte_status.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, R.drawable.av_audio_wifi_normal), null, null, null)
tv_nte_status.setCompoundDrawablesWithIntrinsicBounds(
ContextCompat.getDrawable(
this,
R.drawable.av_audio_wifi_normal
), null, null, null
)
}
if (status == 1) {
tv_nte_status.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, R.drawable.av_audio_wifi_better), null, null, null)
tv_nte_status.setCompoundDrawablesWithIntrinsicBounds(
ContextCompat.getDrawable(
this,
R.drawable.av_audio_wifi_better
), null, null, null
)
}
if (status == -1) {
tv_nte_status.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null)
}
tv_nte_status.visibility = View.VISIBLE
tv_nte_status.postDelayed({
tv_nte_status.visibility = View.GONE
}, 2000)
}
}
......
......@@ -128,9 +128,9 @@ class ConsultantAudioHomeActivity : BaseMvpActivity<IConsultantAudioHomeActivity
* @param muted 该用户是否静音:true: 该用户已静音音频 false: 该用户已取消音频静音
*/
override fun onUserMuteAudio(uid: Int, muted: Boolean) {
runOnUiThread {
showToast("对方静音了,提醒他打开!")
}
// runOnUiThread {
// showToast("对方静音了,提醒他打开!")
// }
}
override fun onJoinChannelSuccess(channel: String?, uid: Int, elapsed: Int) {
......@@ -326,37 +326,34 @@ class ConsultantAudioHomeActivity : BaseMvpActivity<IConsultantAudioHomeActivity
super.onNetworkQuality(uid, txQuality, rxQuality)
var status = -1
var netStatus = when (uid) {
userId!!.toInt() -> {
0 -> {
if (txQuality in 1..2 && rxQuality in 1..2) {
""
} else if (txQuality >= 5 || rxQuality >= 5) {
"对方的网络已断开"
"的网络已断开"
} else {
status = if (txQuality >= 4 || rxQuality >= 4) {
0
} else {
1
}
"对方的网络状况不佳"
"的网络状况不佳"
}
}
0 -> {
else -> {
if (txQuality in 1..2 && rxQuality in 1..2) {
""
} else if (txQuality >= 5 || rxQuality >= 5) {
"的网络已断开"
"对方的网络已断开"
} else {
status = if (txQuality >= 4 || rxQuality >= 4) {
0
} else {
1
}
"的网络状况不佳"
"对方的网络状况不佳"
}
}
else -> {
""
}
}
showNetStatus(netStatus, status)
......
......@@ -144,9 +144,21 @@ class ExpertSearchAdapter(
.into(holder.imgFightEpidemicIcon)
holder.imgFightEpidemicIcon.visibility = View.VISIBLE
}
if(itemBean.joinActivity==true ){
//活动图标
if (!TextUtils.isEmpty(itemBean.activityImg)) {
holder.imgActivity.visibility = View.VISIBLE
GlideApp.with(context).load(itemBean.activityImg).into(holder.imgActivity)
} else {
holder.imgActivity.visibility = View.GONE
}
}else{
holder.imgActivity.visibility = View.GONE
}
//影藏其余所有标签(除公益)
holder.imgAbilityLevel.visibility = View.GONE
holder.imgActivity.visibility = View.GONE
holder.imgNewEnter.visibility = View.GONE
} else {
holder.imgFightEpidemicIcon.visibility = View.GONE
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="@dimen/platform_dp_16"
android:paddingBottom="@dimen/platform_dp_16">
android:orientation="horizontal">
<View
android:layout_width="48dp"
android:layout_height="0.5dp"
android:background="@color/platform_color_EBEBEB"
android:layout_marginRight="@dimen/platform_dp_8"/>
<TextView
android:layout_width="wrap_content"
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_10"
android:text="我是有底线的"/>
<View
android:layout_width="48dp"
android:layout_height="0.5dp"
android:layout_marginLeft="@dimen/platform_dp_8"
android:background="@color/platform_color_EBEBEB"/>
android:background="@color/baby_blue"
android:scaleType="centerCrop"
android:src="@drawable/home_ydl_logo" />
</LinearLayout>
\ No newline at end of file
......@@ -159,7 +159,7 @@ public class MineFragment extends BaseFragment implements SwipeRefreshLayout.OnR
init();
jtv_test.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
// jtv_test.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
refreshCouponData();
}
......
......@@ -553,7 +553,6 @@
android:layout_marginLeft="16dp"
android:layout_marginTop="20dp"
android:layout_marginRight="14dp"
android:layout_marginBottom="20dp"
android:elevation="4dp"
app:cardCornerRadius="6dp">
......
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