From c5d8c58e5557b2763ca9c865e0706f8b42bd3705 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Fri, 27 Sep 2024 18:57:24 +0800 Subject: [PATCH] =?utf8?q?SOS=E5=A2=9E=E5=8A=A0=E6=96=87=E4=BB=B6=E4=BF=9D?= =?utf8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../fd230app/nativeui/alipay/src/AlipaySetting.cpp | 8 ++++++-- .../nativeui/phone/src/phoneaddressmodel.cpp | 4 +--- .../service/ble_service/blemoder/bletest.cpp | 12 +++++++++++- .../wearable/service/ble_service/blemoder/bletest.h | 4 ++++ code/sdk/drivers/peripheral/utils/custom_utils.c | 6 ++++++ 5 files changed, 28 insertions(+), 6 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipaySetting.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipaySetting.cpp index c889eff58..09ad20cfd 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipaySetting.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipaySetting.cpp @@ -10,6 +10,7 @@ #include "cmsis_os.h" #include "AlipaySetting.h" #include "AlipayModel.h" +#include "uicomponents/UIComponents.h" namespace OHOS { static const char *SETTING_TITLE = (char *)"设置"; @@ -111,8 +112,11 @@ bool AlipaySetting::AlipayInitLabel(void) } uint8_t str[ALIPAY_GET_NICKNAME_MAX_LENGTH] = {0}; presenter_->AlipayGetNickName(str); - labelName->SetText((const char *)str); - labelName->SetFont(DEFAULT_VECTOR_FONT_FILENAME, SETTING_NAME_FONT); + uint8_t str_[ALIPAY_GET_NICKNAME_MAX_LENGTH] = {0}; + updata_char((char *)str_,(char *)str,ALIPAY_GET_NICKNAME_MAX_LENGTH); + labelName->SetText((const char *)str_); + labelName->SetFont(DEFAULT_VECTOR_FONT_FILENAME_EN, SETTING_NAME_FONT); + labelName->SetPosition(SETTING_NAME_X, SETTING_NAME_Y, SETTING_NAME_WIDTH, SETTING_NAME_HEIGHT); labelName->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE); labelName->SetStyle(STYLE_TEXT_FONT, SETTING_NAME_FONT); 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 e63161b7a..9954351eb 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phone/src/phoneaddressmodel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phone/src/phoneaddressmodel.cpp @@ -356,7 +356,7 @@ namespace OHOS return address_number; } - #define SOS_NUMBER_PATH "user/userdata/sos_number.bin" + #define SOS_NUMBER_PATH "/user/userdata/sos_number.bin" #define SOS_NUMBER_MAX 3 @@ -371,8 +371,6 @@ namespace OHOS { for(int i=0;i