From: hcj <1224667075@qq.com> Date: Tue, 20 Aug 2024 07:02:30 +0000 (+0800) Subject: 电话UI修改 X-Git-Tag: release_V1.2.70_20241020_135402~609^2~10 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=0c7ed0c6530ac3a6741c51488aaa878ad0a55fed;p=mirrors%2FFD230.git 电话UI修改 --- 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);