From b1beb2e0ff4ddcec10d11467f619318c6afd33ed Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=83=A1=E4=BC=A0=E5=86=9B?= <1224667075@qq.com> Date: Thu, 10 Oct 2024 02:44:19 +0000 Subject: [PATCH] Merge #1137 into sdk602patch0626 from refs/changes/1137/head MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Code review from 胡传军 * refs/changes/1137/head: (4 commits squashed) - 计算器修改,解决double计算精度不够,导致计算出现多余小数位,#963 - sos增加适配HFP呼叫,呼叫备注显示#933 #932 - Merge branch 'sdk602patch0626' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into 0626 - 计算器修改,改为删除仅删除一位 #905 目标同步修改 #921 Signed-off-by: aliyun8003852482 <1224667075@qq.com> Reviewed-by: snickersun@163.com Merged-by: snickersun@163.com CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/1137 --- .../calculator/src/CalculatorView.cpp | 1 - .../nativeui/callerlog/src/CallerLogModel.cpp | 3 ++ .../nativeui/phone/src/phoneaddressmodel.cpp | 1 + .../src/notify/makephone_notification.cpp | 36 +++++++++---------- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/calculator/src/CalculatorView.cpp b/code/sdk/application/wearable/fd230app/nativeui/calculator/src/CalculatorView.cpp index 860ce2622..b368b265c 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/calculator/src/CalculatorView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/calculator/src/CalculatorView.cpp @@ -372,7 +372,6 @@ void CalculatorView::symbol_text_updata_single_buf(const char *buf) text_buf[number_string.length()-1]='\0'; number_string=text_buf; number->SetText(text_buf); - number->SetAlign(TEXT_ALIGNMENT_RIGHT, TEXT_ALIGNMENT_CENTER); if(number_falg==0) { CalculatorModel::GetInstance()->symbol_stack_pop(); diff --git a/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp index 11a0d9700..aafc868dc 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/callerlog/src/CallerLogModel.cpp @@ -136,12 +136,15 @@ void StatusReset(void) CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourcePhone); DisshakeTimer(); + + // If the call is handling in the notification, the slice is not switched if (!CallerLogModel::GetInstance()->GetNotifyFlag()) { PhoneServiceScreenCtr(false); if(NativeAbility::GetInstance().GetCurSliceId() == VIEW_INCOMING_CALL) { + NativeAbility::GetInstance().Back_CountSlice_make_phone(); } 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 f826bc777..578a87378 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phone/src/phoneaddressmodel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phone/src/phoneaddressmodel.cpp @@ -204,6 +204,7 @@ namespace OHOS } } } + strcpy_s(name,NAME_LEN+1,"未知"); return false; } 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 efc8c7342..d15f37b08 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 @@ -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); } -- 2.17.1