|
@@ -57,6 +57,7 @@ import org.greenrobot.eventbus.EventBus
|
|
|
import org.greenrobot.eventbus.Subscribe
|
|
|
import org.greenrobot.eventbus.ThreadMode
|
|
|
import serialporttest.utils.SerialPortUtil
|
|
|
+import xcrash.TombstoneManager
|
|
|
import java.util.*
|
|
|
import java.util.UUID
|
|
|
import kotlin.collections.ArrayList
|
|
@@ -145,9 +146,13 @@ class MainActivity :BaseActivity<MainActivityPresenter, MainActivityLayoutBindin
|
|
|
if (server.buyer.length > 16) {
|
|
|
serverIp = server.buyer.substring(7, 16)
|
|
|
}
|
|
|
- tv_mac_addr.setText("MAC: " + Constant.LOCAL_MAC + ", IP: " + NetHelper.getInstance().localIP + ", server: " + serverIp)
|
|
|
+ tv_mac_addr.setText("MAC: " + Constant.LOCAL_MAC + "\nIP: " + NetHelper.getInstance().localIP + ", server: " + serverIp)
|
|
|
tv_version.setText("V" + BuildConfig.VERSION_NAME + "_" + BuildConfig.VERSION_CODE)
|
|
|
|
|
|
+ if (TombstoneManager.getAllTombstones() != null) {
|
|
|
+ tv_crash.setText("crash日志: " + TombstoneManager.getAllTombstones().size)
|
|
|
+ }
|
|
|
+
|
|
|
//initCallTimer()
|
|
|
}
|
|
|
|
|
@@ -288,7 +293,7 @@ class MainActivity :BaseActivity<MainActivityPresenter, MainActivityLayoutBindin
|
|
|
}).start()
|
|
|
|
|
|
//更新
|
|
|
- tv_mac_addr.setText("MAC: " + Constant.LOCAL_MAC + ", IP: " + NetHelper.getInstance().localIP + ", server: " + serverIp)
|
|
|
+ tv_mac_addr.setText("MAC: " + Constant.LOCAL_MAC + "\nIP: " + NetHelper.getInstance().localIP + ", server: " + serverIp)
|
|
|
}
|
|
|
|
|
|
//显示设备信息
|
|
@@ -867,7 +872,11 @@ class MainActivity :BaseActivity<MainActivityPresenter, MainActivityLayoutBindin
|
|
|
curInteractionVO = interactionVO
|
|
|
updateCallText("呼叫成功,等待接听-->" + interactionVO.fromEthMac.toUpperCase(Locale.ROOT) + ", " + interactionVO.fromDeviceId)
|
|
|
//callTimer.start()
|
|
|
- }
|
|
|
+ } /*else if (Constant.CALL_STATE == Constant.CALL_INCOMING || Constant.CALL_STATE == Constant.CALL_CALLING) {
|
|
|
+ //因为一个转换盒同时只能存在一个通话,如果当前已经有来电或正在通话中则取消该呼叫,但是门灯不灭掉,表示当前房间刚才存在呼叫等待处理
|
|
|
+ SerialPortHelper.closeSoundChannel(interactionVO.fromEthMac)
|
|
|
+ cancelOutCall(interactionVO.fromEthMac, false)
|
|
|
+ }*/
|
|
|
//开启门灯
|
|
|
val doorAddr = getDoorLightAddr(interactionVO.fromEthMac.toUpperCase(Locale.ROOT))
|
|
|
if (!TextUtils.isEmpty(doorAddr)) {
|
|
@@ -890,7 +899,7 @@ class MainActivity :BaseActivity<MainActivityPresenter, MainActivityLayoutBindin
|
|
|
//}
|
|
|
} else if (tcpModel.getAction() == TcpAction.VoiceAction.CALLING) {
|
|
|
//我方呼出,对方通话中
|
|
|
- val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
|
|
|
+ //val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
|
|
|
/*if (curInteractionVO!!.id == interactionVO.id) {
|
|
|
callTimer.cancel()
|
|
|
Constant.CALL_STATE = Constant.CALL_STANDBY
|