|
@@ -195,9 +195,9 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
|
|
|
val buildUrl = UrlManager.build()
|
|
|
val serverIp = buildUrl.buyer.substringAfterLast("//").substringBefore(":")
|
|
|
val str = ("App名称: " + getString(R.string.javashop_app_name)
|
|
|
- + "\r\nAPP版本: V" + BuildConfig.VERSION_NAME + "_" + BuildConfig.VERSION_CODE
|
|
|
+ + "\r\nAPP版本: V" + BuildConfig.VERSION_NAME + "_" + BuildConfig.VERSION_CODE + "_" + Build.MODEL
|
|
|
+ "\r\n发布日期:" + BuildConfig.BUILD_TIME
|
|
|
- + "\r\nAndroid版本: " + Build.VERSION.RELEASE + ", rom: " + Build.MODEL)
|
|
|
+ + "\r\nAndroid版本: " + Build.VERSION.RELEASE)
|
|
|
|
|
|
home_view_local_ip.text = "本机IP: " + ipAddr + ", server: " + serverIp
|
|
|
home_view_local_mac.text = "本机MAC: " + macAddr
|
|
@@ -943,26 +943,7 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
|
|
|
|
|
|
inner class TimeReceiver: BroadcastReceiver() {
|
|
|
override fun onReceive(context: Context, intent: Intent) {
|
|
|
- /*if (intent.action == Intent.ACTION_TIME_TICK
|
|
|
- || intent.action == Intent.ACTION_TIME_CHANGED
|
|
|
- || intent.action == Intent.ACTION_TIMEZONE_CHANGED) {
|
|
|
-
|
|
|
- updateTime(false)
|
|
|
- updateNetState()
|
|
|
- updateTcpState()
|
|
|
-
|
|
|
- //sip状态
|
|
|
- if (SocketManager.getInstance().userState == 1) {
|
|
|
- view_title_layout_tv_point.setBackgroundResource(R.color.green)
|
|
|
- } else {
|
|
|
- view_title_layout_tv_point.setBackgroundResource(R.color.red_color)
|
|
|
- }
|
|
|
-
|
|
|
- //当前不在通话中且laterRestart=true则重启app
|
|
|
- if (Constants.laterRestart && !DeviceChannel.calling) {
|
|
|
- AppUpdateHelper.restartApp(activity)
|
|
|
- }
|
|
|
- } else */if (intent.action == Constants.HOOK_ON) {
|
|
|
+ if (intent.action == Constants.HOOK_ON) {
|
|
|
Log.e(TAG,"手柄放下 ")
|
|
|
Constants.hookOn = true
|
|
|
VoiceManagerUtil.switchAudioMode(activity, true)
|
|
@@ -1295,7 +1276,7 @@ class NurseHomeActivity : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
|
|
|
} else if (tcpModel.getAction() == TcpAction.VoiceAction.ACCEPT) {//对方接受语音
|
|
|
Log.e(TAG, "对方接受语音" + tcpModel.toJson())
|
|
|
//同一时间只能有一个通话,如果当前正处于通话中或连接中,直接返回
|
|
|
- if (DeviceChannel.calling == true && Constants.CALL_STATE == Constants.CALL_CALLING) {
|
|
|
+ if (DeviceChannel.calling && Constants.CALL_STATE == Constants.CALL_CALLING) {
|
|
|
return
|
|
|
}
|
|
|
|