|
@@ -339,7 +339,7 @@ class OfflineMainActivity :BaseActivity<MainActivityPresenter, OfflineMainActivi
|
|
|
|
|
|
//串口处理
|
|
|
override fun serialPortBedOnclick(str: String) {
|
|
|
- /*try {
|
|
|
+ try {
|
|
|
if (Constant.CALL_STATE == Constant.CALL_CALLING) {
|
|
|
//正在通话中,先静音然后再开启,防止噪音
|
|
|
if (SkyEngineKit.Instance() != null && SkyEngineKit.Instance().currentSession != null) {
|
|
@@ -351,11 +351,11 @@ class OfflineMainActivity :BaseActivity<MainActivityPresenter, OfflineMainActivi
|
|
|
SkyEngineKit.Instance().currentSession.toggleMuteAudio(false)
|
|
|
}
|
|
|
}
|
|
|
- }, 800)
|
|
|
+ }, 300)
|
|
|
}
|
|
|
} catch (ex: Exception) {
|
|
|
ex.printStackTrace()
|
|
|
- }*/
|
|
|
+ }
|
|
|
|
|
|
try {
|
|
|
val newStr: String = CutSerialPortUtil.delHeadAndEnd(str, "$", "#")
|
|
@@ -385,14 +385,14 @@ class OfflineMainActivity :BaseActivity<MainActivityPresenter, OfflineMainActivi
|
|
|
updateCallText("待机中")
|
|
|
Constant.CALL_STATE = Constant.CALL_STANDBY
|
|
|
UdpSendUtil.getInstance().sendUdpData(UdpIndex.HOST_CALL_REJECT, "", "", addr, "", "", "", Constant.DEVICE_ID.toString(), Constant.PART_ID.toString())
|
|
|
- SerialPortHelper.closeSoundChannel(addr)
|
|
|
+ //SerialPortHelper.closeSoundChannel(addr)
|
|
|
RingPlayHelper.stopRingTone()
|
|
|
} else {
|
|
|
cancelOutCall(addr, false)
|
|
|
}
|
|
|
} else if (Constant.CALL_STATE == Constant.CALL_CALLING) {
|
|
|
if (addr.equals(callingUart, true)) {
|
|
|
- SerialPortHelper.closeSoundChannel(addr)
|
|
|
+ //SerialPortHelper.closeSoundChannel(addr)
|
|
|
RingPlayHelper.stopRingTone()
|
|
|
handoffCall(addr)
|
|
|
} else {
|
|
@@ -514,7 +514,7 @@ class OfflineMainActivity :BaseActivity<MainActivityPresenter, OfflineMainActivi
|
|
|
}
|
|
|
|
|
|
private fun cancelOutCall(uart: String, resetCall: Boolean) {
|
|
|
- SerialPortHelper.closeSoundChannel(uart)
|
|
|
+ //SerialPortHelper.closeSoundChannel(uart)
|
|
|
for (device in FrameHelper.offlineDevices) {
|
|
|
if (uart.equals(device.uartAddr, true)) {
|
|
|
updateSendTcpInfo("udp cancel $uart")
|