From 52426999ed6de4c10a1595bf1414a77a16c42f85 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Wed, 25 Sep 2024 18:59:24 +0800 Subject: [PATCH] =?utf8?q?=E7=94=B5=E8=AF=9D=E7=BB=BC=E5=90=88=E4=BF=AE?= =?utf8?q?=E5=A4=8D=20#547?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../callerlog/include/CallerLogModel.h | 12 +++ .../makephone/src/MainCallingPresenter.cpp | 29 +++++-- .../nativeui/phone/include/PhoneDirView.h | 10 ++- .../phone/include/phoneaddressmodel.h | 2 +- .../nativeui/phone/src/PhoneDirPresenter.cpp | 2 +- .../nativeui/phone/src/PhoneDirView.cpp | 84 ++++++++++++++++--- .../nativeui/phone/src/phoneaddressmodel.cpp | 2 +- .../msg_center/src/msg_center_customer.cpp | 39 +++++++-- .../src/notify/makephone_notification.cpp | 76 ++++++++--------- .../slip/cat1Service/cat1_server.cpp | 3 +- 10 files changed, 188 insertions(+), 71 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/callerlog/include/CallerLogModel.h b/code/sdk/application/wearable/fd230app/nativeui/callerlog/include/CallerLogModel.h index a81d20a15..9130e27a8 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/callerlog/include/CallerLogModel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/callerlog/include/CallerLogModel.h @@ -144,11 +144,22 @@ CallSource GetCallSource(void) phoneNumberCAT1.append(reinterpret_cast(number), number_len); } + /* 设置cat1临时来电号码显示 */ + void tempSetoperateNumberCAT1END(const char *number, char number_len) + { + phoneNumberCAT1END.clear(); + phoneNumberCAT1END.append(reinterpret_cast(number), number_len); + } + std::string GettempPhoneNumber(void) { return phoneNumberCAT1; } + std::string GettempPhoneendNumber(void) + { + return phoneNumberCAT1END; + } @@ -163,6 +174,7 @@ private: std::string callDuration; // 通话时长 std::string phoneNumber; // 电话号码 std::string phoneNumberCAT1; // 4G电话号码 + std::string phoneNumberCAT1END; // 4G挂断电话号码 std ::string call_name; bool mulitplePhoneStatus{false}; // 判断是否多路通话界面 bool waitingStatus{false}; // 判断是否等待提醒界面 diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp index 574e098e1..fcb146827 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp @@ -193,11 +193,28 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) if (strcmp(view.GetViewId(), "microphoneChange") == 0) { if (changeImage == 0) { changeImage = 1; - view_->GetCallingView()->GetImageMicrophone()->SetSrc(PNG_230_MICROPHONE_CLOSE_IMAGE_PATH); + if(CallerLogModel::GetInstance()->GetCallStatus()) + { + view_->GetCallingView()->GetImageMicrophone()->SetSrc(PNG_230_MICROPHONE_CLOSE_IMAGE_PATH); + + } + else + { + view_->GetScreenView()->GetImageMicrophone()->SetSrc(PNG_230_MICROPHONE_CLOSE_IMAGE_PATH); + } SetMicMute(true); + } else { changeImage = 0; - view_->GetCallingView()->GetImageMicrophone()->SetSrc(PNG_230_MICROPHONE_OPEN_IMAGE_PATH); + if(CallerLogModel::GetInstance()->GetCallStatus()) + { + view_->GetCallingView()->GetImageMicrophone()->SetSrc(PNG_230_MICROPHONE_OPEN_IMAGE_PATH); + + } + else + { + view_->GetScreenView()->GetImageMicrophone()->SetSrc(PNG_230_MICROPHONE_OPEN_IMAGE_PATH); + } SetMicMute(false); } return true; @@ -207,9 +224,9 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) { if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1) { - + cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); cat1_call_hungup(); - cat1_handle_call_disconnected("callnumb"); + } else { @@ -224,6 +241,7 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) { if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1) { + cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); cat1_call_hungup(); return true; //#endif @@ -252,8 +270,9 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1) { + cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); cat1_call_hungup(); - cat1_handle_call_disconnected("callnumb"); + return true; //#endif diff --git a/code/sdk/application/wearable/fd230app/nativeui/phone/include/PhoneDirView.h b/code/sdk/application/wearable/fd230app/nativeui/phone/include/PhoneDirView.h index ea71cb65a..43322dc97 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phone/include/PhoneDirView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/phone/include/PhoneDirView.h @@ -60,19 +60,23 @@ namespace OHOS void initView_ext(int x,int y,int w,int h,int interval,const char *imagsrc); void Set_onepage_address(const char *idstr); void onepage_address_init(void); + bool get_container_one_page_is_Visible(); private: UIView::OnDragListener *draglistener{nullptr}; PhoneDirView(PhoneDirView &&) = delete; PhoneDirView &operator=(PhoneDirView &&) = delete; - UILabelButtonExt *button[20]={NULL}; - UILabelButtonExt *number_button[2]={NULL}; + UILabelExt *label[20] ={nullptr}; + UILabelButtonExt *button[20]={nullptr}; + UILabelButtonExt *number_button[2]={nullptr}; UILabelExt * label1_phone_name=nullptr; UIImageView *phone_name=nullptr; + UIImageView *phone_name_=nullptr; + UILabelExt *label1_ =nullptr; UIScrollView *container_ =nullptr; UIScrollView *container_one_page=nullptr; - + UILabelExt *label1_no =nullptr; UILabelExt *label2_no=nullptr; UIImageView *image1_no=nullptr; diff --git a/code/sdk/application/wearable/fd230app/nativeui/phone/include/phoneaddressmodel.h b/code/sdk/application/wearable/fd230app/nativeui/phone/include/phoneaddressmodel.h index 4bdf238ee..f79b08122 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phone/include/phoneaddressmodel.h +++ b/code/sdk/application/wearable/fd230app/nativeui/phone/include/phoneaddressmodel.h @@ -4,7 +4,7 @@ #define ADDRESS_BOOK_PATH "/user/userdata/addressbook.bin" -#define NAME_LEN (10*3) +#define NAME_LEN (30*3) #define NUMBER_LEN 20 #define AREA_LEN (20*3) #define OPERATOR_LEN (4*3) diff --git a/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirPresenter.cpp index 0203d1a92..7f1198662 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirPresenter.cpp @@ -87,7 +87,7 @@ namespace OHOS //if(strview.GetViewId()) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "PhoneDirPresenter----------%s ---",view.GetViewId()); - if(strlen(view.GetViewId())<5) + if(PhoneDirView::GetInstance()->get_container_one_page_is_Visible()==false) { PhoneDirView::GetInstance()->Set_onepage_address(view.GetViewId()); Set_onepage_address=true; diff --git a/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirView.cpp b/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirView.cpp index bb620618b..0e82dd01d 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirView.cpp @@ -58,7 +58,7 @@ namespace OHOS button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, buttonconfig.Fontsize); button->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff191919, UIButton::PRESSED); - button->SetImagePosition(25, 25); + button->SetImagePosition(20, 20); return button; } @@ -78,7 +78,21 @@ namespace OHOS for(int i=0;iSetPosition(x+107, buttonconfig.y+33); // widget's left position and top position + label[i]->Resize(210, 35); // widget's width and height + label[i]->SetViewId("label1");// Set style + label[i]->SetStyle(STYLE_TEXT_FONT, 30); + + // Set additional property + label[i]->SetText(addressbook_t.Contact_t[i].name); + label[i]->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE); + label[i]->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER); + label[i]->SetRollSpeed(70); + label[i]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); + label[i]->SetVisible(true); + //char buf[32]={0}; //sprintf(buf,"1",i); //buf[0]=i+48; @@ -90,8 +104,10 @@ namespace OHOS buttonconfig.Fontsize=30; buttonconfig.ALIGN=TEXT_ALIGNMENT_LEFT; button[i] = SetTheButton_ext(buttonconfig, clickListener); + buttonconfig.y+=interval; container_->Add(button[i]); + container_->Add(label[i]); } onepage_address_init(); /* -------------------------------------------------------------------------- */ @@ -105,7 +121,7 @@ namespace OHOS //container_one_page->SetStyle(STYLE_BACKGROUND_OPA, 0); container_one_page->SetViewId("container_one_page"); container_one_page->SetScrollBlankSize(35); - container_one_page->SetReboundSize(35); + //container_one_page->SetReboundSize(50); container_one_page->SetDirection(1); } @@ -113,8 +129,8 @@ namespace OHOS if (label1_phone_name == nullptr) { label1_phone_name = new UILabelExt(); } - label1_phone_name->SetPosition(40+20, 52); // widget's left position and top position - label1_phone_name->Resize(466-80-40, 30); // widget's width and height + label1_phone_name->SetPosition(128, 52); // widget's left position and top position + label1_phone_name->Resize(210, 30); // widget's width and height label1_phone_name->SetViewId("label1");// Set style label1_phone_name->SetStyle(STYLE_TEXT_FONT, 30); @@ -167,9 +183,7 @@ namespace OHOS for(int i=0;i<2;i++) { buttonconfig.str=addressbook_t.Contact_t[0].phone_number_t[0].number; - char buf[32]={0}; - sprintf(buf,"%s",i); - buttonconfig.ViewId =buf; + buttonconfig.ViewId =addressbook_t.Contact_t[0].phone_number_t[0].number; buttonconfig.ImageSrc=nullptr; buttonconfig.label_x=50; buttonconfig.label_y=0; @@ -188,12 +202,28 @@ namespace OHOS } container_one_page->SetOnDragListener(draglistener); + if (phone_name_ == nullptr) { + phone_name_ = new UIImageView(); + } + phone_name_->SetPosition(0, 520); // widget's left position and top position + phone_name_->Resize(466, 30); // widget's width and height + phone_name_->SetViewId("phone_sex");// Set style + + container_one_page->Add(phone_name_); + + phone_name_->SetVisible(true); return; } + bool PhoneDirView::get_container_one_page_is_Visible() + { + return container_one_page->IsVisible(); + } + + void PhoneDirView::Set_onepage_address(const char *idstr) { if(strcmp("container_one_page",idstr)==0) @@ -203,13 +233,20 @@ namespace OHOS return; } - - //container_->SetVisible(false); + container_one_page->ScrollBy(0, 100); + container_->SetVisible(false); container_one_page->SetVisible(true); uint8_t id= atoi(idstr);//idstr[16]; + if(id>=20) + { + return; + } + if(addressbook_t.Contact_t[id].name) label1_phone_name->SetText(addressbook_t.Contact_t[id].name); + label1_phone_name->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); + phone_name->SetSrc(addressbook_t.Contact_t[0].sex ? image_boy:image_girl); int len =addressbook_t.Contact_t[id].phone_num; @@ -256,6 +293,16 @@ namespace OHOS } } + for(int i=0;iRemoveAll(); @@ -267,6 +314,14 @@ namespace OHOS delete phone_name; phone_name = nullptr; } + if(phone_name_) + { + delete phone_name_; + phone_name_ = nullptr; + } + + + ImageCacheManager::GetInstance().UnloadSingleRes(PHONE_DIR_BOY_1); ImageCacheManager::GetInstance().UnloadSingleRes(PHONE_DIR_GIRL_1); @@ -435,8 +490,17 @@ namespace OHOS RootView::GetInstance()->Add(container_); if(container_one_page) + { + if (draglistener == nullptr) + { + return; + } + container_one_page->SetOnDragListener(draglistener); + } RootView::GetInstance()->Add(container_one_page); + + // 增加按键监听 RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::PhoneDirPresenter::GetInstance(); RootView::GetInstance()->SetOnKeyActListener(keyactListener); diff --git a/code/sdk/application/wearable/fd230app/nativeui/phone/src/phoneaddressmodel.cpp b/code/sdk/application/wearable/fd230app/nativeui/phone/src/phoneaddressmodel.cpp index d8bfb9d25..7d38343aa 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phone/src/phoneaddressmodel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phone/src/phoneaddressmodel.cpp @@ -344,7 +344,7 @@ namespace OHOS void set_address_number(char * number) { - memset(address_number,0,20); + memset(address_number,0,NUMBER_LEN); memcpy_s(address_number,20,number,strlen(number)); } 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 3973e4f5c..1fe6facd4 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 @@ -815,14 +815,25 @@ void MsgCenterNotifyCatIncomingCallProc(const Topic topic, Request* req) // Prevent this from happening: // When the incoming call view is displayed, the calling number is not set in CallerLogModel. //uapi_hfp_disconnect(); + if(NotificationManager::GetInstance()->GetWatchCallStatus() && + (CallerLogModel::GetInstance()->GetCallSource()==CallerLogModel::CallSourceCat1)) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OPERATE_WATCH_REJECT %s!=%s??",call_data,CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); + CallerLogModel::GetInstance()->tempSetoperateNumberCAT1END(call_data,req->len); + cat1_phone_state_change_cb(OPERATE_WATCH_REJECT); + free(call_data); + return; + } + if((NotificationManager::GetInstance()->GetWatchCallStatus() && (CallerLogModel::GetInstance()->GetCallSource()==CallerLogModel::CallSourcePhone)) || uapi_dev_runtime_get_train_status()) { CallerLogModel::GetInstance()->tempSetoperateNumberCAT1(call_data,req->len); + NotificationManager::GetInstance()->SetWatchCallStatus(true); cat1_phone_state_change_cb(OPERATE_WAITING); free(call_data); - + return; } else @@ -843,12 +854,12 @@ void MsgCenterNotifyCatIncomingCallProc(const Topic topic, Request* req) AlarmClockModel::GetInstance()->testPlayerStart("/music/ring/ring.mp3"); } - CallerLogModel::GetInstance()->SetoperateNumber(call_data,req->len); + CallerLogModel::GetInstance()->SetoperateNumber(call_data,strlen(call_data)); CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourceCat1); - + NotificationManager::GetInstance()->SetWatchCallStatus(true); NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_ONE); cat1_phone_state_change_cb(OPERATE_INCOMING); - NotificationManager::GetInstance()->SetWatchCallStatus(true); + } free(call_data); @@ -913,6 +924,7 @@ void MsgCenterNotifyCat1CallEndedProc(const Topic topic, Request* req) { unused(topic); unused(req); + // just stop the notify AlarmClockModel::GetInstance()->AlarmPlayerStop(); // AlarmViewEventListener::GetInstance()->CancelAlarmRing(); @@ -920,8 +932,23 @@ void MsgCenterNotifyCat1CallEndedProc(const Topic topic, Request* req) { return; } - cat1_phone_state_change_cb(OPERATE_WATCH_FINISH); - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetWatchCallStatus false"); + + if (req == NULL) return ; + char* call_data = (char*)malloc(req->len); + int32 ret = memcpy_s(call_data, req->len, req->data, req->len); + if(strcmp(CallerLogModel::GetInstance()->GetPhoneNumber().c_str(),call_data)!=0 && + CallerLogModel::GetInstance()->GetCallSource()==CallerLogModel::CallSourceCat1) + { + + + } + else + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OPERATE_WATCH_FINISH"); + cat1_phone_state_change_cb(OPERATE_WATCH_FINISH); + } + //free(call_data); + } diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp index 13da94aad..3d9b07b73 100755 --- a/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp @@ -47,7 +47,6 @@ // #define NOTIFY_ONE_MINUTE 60000 // #define NOTOFY_NO_OPERATE_TIME 35000 static uint8_t sos_dail_falg=0; -static char*sos_dail_buf[]={"10085","10086","10084"}; #define SOS_TEST_FLAG 0 @@ -55,39 +54,6 @@ static char*sos_dail_buf[]={"10085","10086","10084"}; #define DIAL_TIME 30 -#define SOS_NUMBER_PATH "user/userdata/sos_number.bin" - -void SOS_number_save(void) -{ - FILE *fp=fopen(SOS_NUMBER_PATH,"wb+"); - if(fp) - { - for(int i=0;i<3;i++) - { - char W_buf[20]={0}; - memcpy_s(W_buf,20,sos_dail_buf[i],osal_strlen((const char*)sos_dail_buf[i])); - fwrite(W_buf,1,20,fp); - } - fclose(fp); - } -} - -void SOS_number_init(void) -{ - FILE *fp=fopen(SOS_NUMBER_PATH,"rb+"); - if(fp) - { - for(int i=0;i<3;i++) - { - char r_buf[20]={0}; - fread(r_buf,1,20,fp); - sos_dail_buf[i]=(char *)malloc(osal_strlen((const char*)r_buf)); - memcpy_s(sos_dail_buf[i],20,r_buf,osal_strlen((const char*)r_buf)); - } - fclose(fp); - } -} - @@ -107,12 +73,12 @@ void sos_falg_add(void) if(uapi_cat1_get_power_stat() && uapi_dev_runtime_get_cat1_simstat()) #endif { - calldial_event_sendmsg_toUI(sos_dail_buf[(sos_dail_falg)%3]); + calldial_event_sendmsg_toUI(OHOS:: get_sos_number(sos_dail_falg)); } #if SOS_HFP_FALG else if(uapi_hfp_connect_state()) { - DialCall((unsigned char *)sos_dail_buf[sos_dail_falg],osal_strlen((const char*)sos_dail_buf[sos_dail_falg])); + DialCall((unsigned char *)OHOS::get_sos_number(sos_dail_falg),osal_strlen((const char*)OHOS::get_sos_number(sos_dail_falg))); } #endif else @@ -140,7 +106,7 @@ void start_SOS_phone_dail(void) if(uapi_cat1_get_power_stat()|| uapi_dev_runtime_get_cat1_simstat()) #endif { - calldial_event_sendmsg_toUI(sos_dail_buf[0]); + calldial_event_sendmsg_toUI(OHOS::get_sos_number(0)); sos_dail_falg=1; } #if SOS_HFP_FALG @@ -459,6 +425,7 @@ UIViewGroup* SOS_cant_dial(void) } CallLogInfo info; + void calllog_info_init(uint8_t type) { strcpy(info.name,"xxx"); @@ -469,7 +436,7 @@ void calllog_info_init(uint8_t type) len=strlen(CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); memcpy_s(info.tel,20,CallerLogModel::GetInstance()->GetPhoneNumber().c_str(),len+1); } - else + else if(type==1) { len=strlen(CallerLogModel::GetInstance()->GettempPhoneNumber().c_str()); memcpy_s(info.tel,20,CallerLogModel::GetInstance()->GettempPhoneNumber().c_str(),len+1); @@ -500,6 +467,25 @@ void addcalllog() } } +void addcalllogend() +{ + CallLogInfo info; + strcpy(info.name,"xxx"); + info.nameLen=3; + int len; + len=strlen(CallerLogModel::GetInstance()->GettempPhoneendNumber().c_str()); + memcpy_s(info.tel,20,CallerLogModel::GetInstance()->GettempPhoneendNumber().c_str(),len+1); + uint32_t tmptime=0; + uapi_get_timestampe_ss(&tmptime); + info.creationTime = tmptime; + info.callDurTime=0; + info.telLen=len; + info.calllogtype=CALL_CAT1; + info.status=CALL_MISSED; + AddToCallLog_CAT1(&info); + + return; +} static int g_callOperate = OPERATE_NO_OPE; @@ -557,8 +543,7 @@ static void WatchActiveHandle() static void WatchFinishHandle(void) { - if (NativeAbility::GetInstance().GetCurSliceId() == VIEW_INCOMING_CALL || - CallerLogModel::GetInstance()->GetNotifyFlag()) + if (NotificationManager::GetInstance()->GetWatchCallStatus()) { if(get_falg_SOS()) { @@ -574,10 +559,11 @@ static void WatchFinishHandle(void) else if(uapi_dev_runtime_get_train_status()) { addcalllog(); + StatusReset(); } else { - PhoneServiceScreenCtr(false); + uapi_cat1_stop_volte_voice(); addcalllog(); StatusReset(); @@ -610,6 +596,7 @@ void cat1_phone_state_change_cb(uint8_t state) PhoneServiceScreenCtr(true); IncomingHandle(); calllog_info_init(0); + if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { ui_api_vibrate_once_func(); @@ -637,7 +624,12 @@ void cat1_phone_state_change_cb(uint8_t state) WatchFinishHandle(); return; + //手表不做任何处理仅记录 case OPERATE_WATCH_REJECT: + CustomEventPublish(TOPIC_EVENT_HFP_HINT,NULL,0); + + addcalllogend(); + return; default: break; } @@ -703,7 +695,7 @@ void CalldialTimerCallBackProc(int data) if(dail_falg>=DIAL_TIME) { cat1_call_hungup(); - cat1_handle_call_disconnected("callnumb"); + cat1_handle_call_disconnected((char *)CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); } } diff --git a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp index 2ab86e783..a16907955 100644 --- a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp +++ b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp @@ -1000,7 +1000,7 @@ int cat1_handle_call_connected(char* phonenum) WEARABLE_LOGI(WEARABLE_LOG_MODULE_MAIN_SERVICE,"cat1 call connected %s\n",phonenum); //声音处理 incomedcall_event_sendmsg_toUI(phonenum); - uapi_cat1_start_volte_voice(); + //uapi_cat1_start_volte_voice(); return 1; } @@ -1010,7 +1010,6 @@ int cat1_handle_call_disconnected(char* phonenum) WEARABLE_LOGI(WEARABLE_LOG_MODULE_MAIN_SERVICE,"cat1 call disconnected %s\n",phonenum); //TODO: 关闭声音 callend_event_sendmsg_toUI(phonenum); - uapi_cat1_stop_volte_voice(); return 1; } void get_software_version_toCat1(void)//发送固件版本到cat1 -- 2.17.1