|
@@ -1671,8 +1671,11 @@ class CallingbedActivity :BaseActivity<BedCallingbedActivityPresenter, Callingbe
|
|
|
private fun handleSOSButton(currentTime: Long) {
|
|
|
if (currentTime - clickTime > 2000) {
|
|
|
if (Constant.TCP_CONNECTED) {
|
|
|
- val tcpModel = OtherUtil.SOSCall(Constant.DEVICE_ID)
|
|
|
- TcpClient.getInstance().sendMsg(tcpModel.toJson())
|
|
|
+ SOSHelper.sosStart()
|
|
|
+ } else {
|
|
|
+ if (SettingConfig.getOfflineMode(BaseApplication.appContext)) {
|
|
|
+ SOSHelper.sosUdpStart()
|
|
|
+ }
|
|
|
}
|
|
|
clickTime = currentTime
|
|
|
} else {
|