Commit b537cadc by 万齐军

Merge branch 'darren_confide_2.0' into 'd/v_confide_2.0'

fix bug mr改动

See merge request app_android_lib/YDL-Component!93
parents d4370995 d7f9853a
......@@ -12,10 +12,7 @@ import android.hardware.SensorEventListener
import android.hardware.SensorManager
import android.media.MediaPlayer
import android.net.Uri
import android.os.Build
import android.os.Handler
import android.os.PowerManager
import android.os.Vibrator
import android.os.*
import android.provider.Settings
import android.text.TextUtils
import android.view.View
......@@ -189,7 +186,7 @@ class AudioHomeActivity :
private var mPlayer: AudioPlayer? = null
private var vibrator: Vibrator? = null
private var handler: Handler? = null
private var phone_handler: Handler? = null
private var phoneHandler: Handler? = Handler(Looper.getMainLooper())
//声网
private var voiceManage: YDLVoiceManager? = null
......@@ -547,21 +544,19 @@ class AudioHomeActivity :
.sendRichLog(AliYunLogConfig.AGORA, "主叫方发送的邀请通话消息内容:$content")
localRemainTime = (totalDuration?:1500).minus(remainTime?.toInt()?:1500)
handler = Handler()
phone_handler = Handler()
vibrator = getSystemService(Service.VIBRATOR_SERVICE) as Vibrator?
vibrator = getSystemService(Service.VIBRATOR_SERVICE) as Vibrator?
var count = 0
phone_handler!!.postDelayed(object : Runnable {
phoneHandler?.postDelayed(object : Runnable {
override fun run() {
if(count % 2 == 0){
tv_tips.text = "正在发送倾诉请求…"
}else{
tv_tips.text = "正在等待聆听者接受邀请…"
}
count++
phone_handler!!.postDelayed({ this.run() }, 3000)
phoneHandler?.postDelayed({ this.run() }, 3000)
}
}, 3000)
......@@ -1109,7 +1104,7 @@ class AudioHomeActivity :
*/
private fun connectSuccess() {
isConnectSuccess = true
handler!!.removeCallbacksAndMessages(null)
phoneHandler?.removeCallbacksAndMessages(null)
//通知服务端,此次通话已经接通,服务端开始订单
updateExpertStatus(false, 0)
......@@ -1385,7 +1380,7 @@ class AudioHomeActivity :
override fun onDestroy() {
super.onDestroy()
uploadLog()
phone_handler?.removeCallbacksAndMessages(null)
phoneHandler?.removeCallbacksAndMessages(null)
if (isConnectSuccess) {
uploadException("", "zhu", "108", callback = null)
}
......@@ -1393,8 +1388,8 @@ class AudioHomeActivity :
handler = null
}
if (phone_handler != null){
phone_handler = null
if (phoneHandler != null){
phoneHandler = null
}
hasUpLoadLog = false
......
......@@ -145,8 +145,13 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
shareUrl += "?id=${item.confideId}"
}
val dialog = YDLShareDialog.style8(
aty, "${item.name.get()}_${item.title.get()}", shareUrl, "壹点灵心理服务平台让天下人更快乐", item.avatar.get(),
genMinProgramPath(shareUrl), "gh_25b90294ddcc"
aty,
"${item.name.get()}_${item.title.get()}",
shareUrl,
"壹点灵心理服务平台让天下人更快乐",
item.avatar.get(),
genMinProgramPath(shareUrl),
"gh_25b90294ddcc"
)
dialog.show(aty.fragmentManager, "share")
}
......@@ -201,13 +206,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
}
val controller: DraweeController = Fresco.newDraweeControllerBuilder()
.setUri(Uri.parse("res://drawable/"+ R.drawable.first_order))
.setUri(Uri.parse("res://drawable/" + R.drawable.first_order))
.setOldController(binding.confideFirstFree.controller)
.setAutoPlayAnimations(true) // 是否自动播放Gif动画
.build()
binding.confideFirstFree.controller = controller
binding.seekbar.progress = 0
binding.seekbar.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener {
override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
......@@ -302,7 +306,12 @@ internal class ItemIntroHolder(binding: ItemExpertIntroBinding) :
item.confideId?.let {
val url = HttpConfig.MH5_URL + ConfideRoute.h5ConfideIntro(it)+ if(toPay) "&payPage=1" else ""
ConfideBottomSheetDialogFragment()
.showBottomSheetDialog(itemView.context as FragmentActivity, url, item.doctorId!!, uid = item.uid)
.showBottomSheetDialog(
itemView.context as FragmentActivity,
url,
item.doctorId!!,
uid = item.uid
)
}
}
}
......
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