From 0c358a7133756f820391a36b2f1172631ea85683 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Sat, 12 Oct 2024 19:55:28 +0800 Subject: [PATCH] =?utf8?q?=E7=94=B5=E8=AF=9D=E5=A2=9E=E5=8A=A0=E5=91=BC?= =?utf8?q?=E5=8F=AB=E5=A4=B1=E8=B4=A5=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../service/msg_center/src/msg_center_customer.cpp | 12 ++++++++++-- .../peripheral/slip/cat1Service/cat1_server.cpp | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp index 8e5b3c4f1..9a3d984a4 100644 --- a/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp @@ -647,7 +647,7 @@ void MsgCenterNotifyHfpWatchHintProc(const Topic topic, Request* req) } //NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_ONE); - + if(NotificationManager::GetInstance()->HasNotifyShowing()) NotificationManager::GetInstance()->StopNotify(); @@ -997,6 +997,13 @@ void MsgCenterNotifyCat1CallEndedProc(const Topic topic, Request* req) char* call_data = (char*)malloc(req->len); int32 ret = memcpy_s(call_data, req->len, req->data, req->len); + if(strcmp("callfail",call_data)==0) + { + cat1_phone_state_change_cb(OPERATE_WATCH_FINISH); + free(call_data); + return; + } + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s %s",call_data,CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); uint8_t offset_watch =0; if(CallerLogModel::GetInstance()->GetPhoneNumber().c_str()[0]=='+') @@ -1021,7 +1028,8 @@ void MsgCenterNotifyCat1CallEndedProc(const Topic topic, Request* req) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OPERATE_WATCH_FINISH"); cat1_phone_state_change_cb(OPERATE_WATCH_FINISH); } - //free(call_data); + + free(call_data); } diff --git a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp index a16907955..e3fece0d5 100644 --- a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp +++ b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp @@ -745,6 +745,7 @@ void cat1_call_dial(char* phonenum) { bool volte = OHOS::ConfigModel::GetInstance()->GetVoLTE_Call(); if (volte == true){ + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"cat1_call_dial\n"); udp_send_msg_toCat1(UDP_CMD_DIAL_NUMB,phonenum); } @@ -1279,6 +1280,10 @@ static int udp_packet_parse(char *rx_buffer, int len) } } + if(strstr(msg_buffer,"callfail")!=NULL) + { + cat1_handle_call_disconnected("callfail"); + } break; case UDP_MSG_GET_TELECON_DMP_TIMESEC://暂时不用 -- 2.17.1