From: hcj <1224667075@qq.com> Date: Wed, 9 Oct 2024 10:11:04 +0000 (+0800) Subject: sos增加适配HFP呼叫,呼叫备注显示#933 #932 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=a49845ac7676c3590afcdc874061bff0daba7e13;p=mirrors%2FFD230.git sos增加适配HFP呼叫,呼叫备注显示#933 #932 --- 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 9954351eb..578a87378 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phone/src/phoneaddressmodel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phone/src/phoneaddressmodel.cpp @@ -169,6 +169,19 @@ namespace OHOS bool get_phone_addrss_name(char *name,const char *phone,uint8_t *sex) { + + for(int i=0;i=9) + if(sos_dail_falg>=OHOS::get_sos_number_count()*3) { sos_dail_falg=0; } @@ -112,7 +112,7 @@ void start_SOS_phone_dail(void) #if SOS_HFP_FALG else if(uapi_hfp_connect_state()) { - DialCall((unsigned char *)sos_dail_buf,osal_strlen((const char*)sos_dail_buf)); + DialCall((unsigned char *)OHOS::get_sos_number(0),osal_strlen((const char*)OHOS::get_sos_number(0))); sos_dail_falg=1; } #endif @@ -545,31 +545,31 @@ static void WatchFinishHandle(void) { if (NotificationManager::GetInstance()->GetWatchCallStatus()) { - if(get_falg_SOS()) + if(get_falg_SOS()) { addcalllog(); sos_falg_add(); } else { - if(CallerLogModel::GetInstance()->GetCallSource()==CallerLogModel::CallSourcePhone) - { - addcalllog(); - } - else if(uapi_dev_runtime_get_train_status() || transmittingISShow()) - { - addcalllog(); - StatusReset(); - } - else - { - uapi_cat1_stop_volte_voice(); - - addcalllog(); - StatusReset(); - } + if(CallerLogModel::GetInstance()->GetCallSource()==CallerLogModel::CallSourcePhone) + { + addcalllog(); } - + else if(uapi_dev_runtime_get_train_status() || transmittingISShow()) + { + addcalllog(); + StatusReset(); + } + else + { + uapi_cat1_stop_volte_voice(); + + addcalllog(); + StatusReset(); +} + } + } DisableCallTimer(CallTimerType::NOTIFY_PHONE_DIAL_DISPLAY); } @@ -614,7 +614,6 @@ void cat1_phone_state_change_cb(uint8_t state) if(call_stat==2) call_stat=1; PhoneServiceScreenCtr(true); - sos_falg_clean(); WatchActiveHandle(); break; case OPERATE_PHONE_HOLD: