From 0c7ed0c6530ac3a6741c51488aaa878ad0a55fed Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Tue, 20 Aug 2024 15:02:30 +0800 Subject: [PATCH] =?utf8?q?=E7=94=B5=E8=AF=9DUI=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../fd230app/nativeui/bluetooth/src/Bluetooyhpabpserver.cpp | 2 ++ .../fd230app/nativeui/makephone/src/CallerDisplayView.cpp | 2 ++ .../wearable/fd230app/nativeui/makephone/src/CallingView.cpp | 2 ++ .../wearable/fd230app/nativeui/phone/src/PhoneCallPresenter.cpp | 2 +- .../wearable/fd230app/nativeui/phone/src/PhoneCallView.cpp | 2 +- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/Bluetooyhpabpserver.cpp b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/Bluetooyhpabpserver.cpp index ddffb93bf..f9bc8164a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/Bluetooyhpabpserver.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/Bluetooyhpabpserver.cpp @@ -464,6 +464,8 @@ void uapi_pbap_cmd_pull_vcard_listing(unsigned char *tell) uint16_t list_offset=0; uint8_t order=0; + OHOS:: CallerLogModel::GetInstance()->Setphonebname("0",1); + if (!wstp_pbap_check_param_valid(folder, vcf, max_list_count, list_offset, 0)) { printf("pbap param invalid\n"); return; diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallerDisplayView.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallerDisplayView.cpp index 812153a1d..4983723e8 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallerDisplayView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallerDisplayView.cpp @@ -166,7 +166,9 @@ bool CallerDisplayView::InitUILabelDisplay() { callerDisplay->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); } + if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourcePhone) updataCallingname(); + callerDisplay->SetAlign(TEXT_ALIGNMENT_CENTER); callerDisplay->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_CALLER_SIZE); callerDisplay->SetTextColor(Color::White()); diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp index bce2d1657..55d6cb1c2 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp @@ -253,6 +253,8 @@ bool CallingView::InitUILabelDisplay() { callerDisplay->SetText(CallerLogModel::GetInstance()->GetPhoneNumber().c_str()); } + + if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourcePhone) updataCallingname(); diff --git a/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneCallPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneCallPresenter.cpp index 34d94e01f..68e5a96f1 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneCallPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneCallPresenter.cpp @@ -147,7 +147,7 @@ namespace OHOS phoneNumber.pop_back(); } } - else if (phoneNumber.length() < 11) // 检查号码字符串长度是否小于11 + else { if (strcmp(viewId, BUTTON0) == 0) { diff --git a/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneCallView.cpp b/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneCallView.cpp index d4f0b7091..1f313968e 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneCallView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneCallView.cpp @@ -99,7 +99,7 @@ namespace OHOS label_->SetText(PhoneCallPresenter::GetInstance()->phoneNumber.c_str()); printf("view phoneNumber: %s\n", PhoneCallPresenter::GetInstance()->phoneNumber.c_str()); - label_->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); + label_->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE); label_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); label_->SetRollSpeed(0); label_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40); -- 2.17.1