From c9dfde598309f763b3f332a02127c57378287463 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=83=A1=E4=BC=A0=E5=86=9B?= <1224667075@qq.com> Date: Mon, 9 Sep 2024 08:44:38 +0000 Subject: [PATCH] Merge #918 into sdk602patch0626 from refs/changes/918/head MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Code review from 胡传军 * refs/changes/918/head: (2 commits squashed) - 增加运动中自动拒接电话 - Merge branch 'sdk602patch0626' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into 0626 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/918 --- .../nativeui/phoneservice/src/PhoneService.cpp | 4 ++-- .../service/msg_center/src/msg_center_customer.cpp | 9 +++++++++ .../src/notify/makephone_notification.cpp | 13 ++++++++++--- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp index 6c2915c75..27c118eb0 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phoneservice/src/PhoneService.cpp @@ -1458,8 +1458,8 @@ static void CallStateChanged(const bd_addr_t *bdAddr, const hfp_hf_calls_info_t } } - if(OHOS::CallerLogModel::GetInstance()->GetCallSource() == OHOS::CallerLogModel::CallSourceCat1 - && OHOS::NotificationManager::GetInstance()->GetWatchCallStatus()) + if((OHOS::CallerLogModel::GetInstance()->GetCallSource() == OHOS::CallerLogModel::CallSourceCat1 + && OHOS::NotificationManager::GetInstance()->GetWatchCallStatus())||uapi_dev_runtime_get_train_status() ) { { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "4G 电话中"); 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 3163c01f4..61fed1c35 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 @@ -803,6 +803,15 @@ void MsgCenterNotifyCatIncomingCallProc(const Topic topic, Request* req) // When the incoming call view is displayed, the calling number is not set in CallerLogModel. //uapi_hfp_disconnect(); + if(uapi_dev_runtime_get_train_status()) + { + CallerLogModel::GetInstance()->SetoperateNumber(call_data,req->len); + cat1_call_hungup(); + free(call_data); + + return; + } + if(NotificationManager::GetInstance()->GetWatchCallStatus() && (CallerLogModel::GetInstance()->GetCallSource()==CallerLogModel::CallSourcePhone)) { 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 9d9d9cf3e..f36c09371 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 @@ -348,15 +348,15 @@ UIViewGroup* CALL_INCOMING_HINT(void) Hint_UILabel->SetStyle(STYLE_BACKGROUND_COLOR, 0xffAAAAAA); Hint_UILabel->SetStyle(STYLE_BACKGROUND_OPA, 0xff); Hint_UILabel->SetStyle(STYLE_BORDER_RADIUS, 27); - Hint_UILabel->SetStyle(STYLE_TEXT_FONT, 33); + Hint_UILabel->SetStyle(STYLE_TEXT_FONT, 40); Hint_UILabel->SetStyle(STYLE_LINE_SPACE, 0); // Set additional property - Hint_UILabel->SetText("手机新来电"); + Hint_UILabel->SetText("新来电"); Hint_UILabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); Hint_UILabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); Hint_UILabel->SetRollSpeed(0); - Hint_UILabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 33); + Hint_UILabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); HintView->Add(Hint_UILabel); Hint_UILabel->SetVisible(true); @@ -590,6 +590,7 @@ static void WatchFinishHandle(void) { if(get_falg_SOS()) { + addcalllog(); sos_falg_add(); } else @@ -597,6 +598,12 @@ static void WatchFinishHandle(void) if(CallerLogModel::GetInstance()->GetCallSource()==CallerLogModel::CallSourcePhone) { + } + else if(uapi_dev_runtime_get_train_status()) + { + calllog_info_init(); + call_stat=2; + addcalllog(); } else { -- 2.17.1