From: hcj <1224667075@qq.com> Date: Sat, 12 Oct 2024 11:55:28 +0000 (+0800) Subject: 电话增加呼叫失败处理 X-Git-Tag: release_V1.2.70_20241020_135402~59^2~2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=0c358a7133756f820391a36b2f1172631ea85683;p=mirrors%2FFD230.git 电话增加呼叫失败处理 --- 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://暂时不用