From 4d0d0c9d295558fc3d6c7bb448bc38aaf70ff283 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Tue, 10 Sep 2024 14:38:51 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=20#635=E4=BD=8E=E7=94=B5?= =?utf8?q?=E9=87=8F=E6=8F=90=E9=86=92=20#500=E8=81=94=E7=B3=BB=E4=BA=BA?= =?utf8?q?=E9=A1=B5=E9=9D=A2=E4=B8=8D=E6=B5=81=E7=95=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../application/battery/service/battery_service.cpp | 2 +- .../nativeui/makephone/src/CallerDisplayView.cpp | 2 +- .../fd230app/nativeui/phone/src/PhoneDirView.cpp | 1 + .../service/msg_center/src/msg_center_customer.cpp | 11 +++++++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/code/sdk/application/battery/service/battery_service.cpp b/code/sdk/application/battery/service/battery_service.cpp index 9560c8353..cb16d6cb3 100644 --- a/code/sdk/application/battery/service/battery_service.cpp +++ b/code/sdk/application/battery/service/battery_service.cpp @@ -443,7 +443,7 @@ errcode_t Play_shutdown_animation_notify(uint8_t alarm_level) low_power_flag_2=0; ChargerEventPublish(TOPIC_EVENT_LOWPOWER_ALARM,alarm_level); } - else + else if(alarm_level!=0 && alarm_level!=1) { ChargerEventPublish(TOPIC_EVENT_LOWPOWER_ALARM,alarm_level); } 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 13f8f2379..55d105770 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallerDisplayView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallerDisplayView.cpp @@ -194,7 +194,7 @@ bool CallerDisplayView::InitUILabelDisplay() label_call_hint->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); label_call_hint->SetRollSpeed(0); label_call_hint->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); - group->Add(label_call_hint); + //group->Add(label_call_hint); if (label_call_source == nullptr) { diff --git a/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirView.cpp b/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirView.cpp index f436ad9a3..300dd8eb3 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirView.cpp @@ -388,6 +388,7 @@ namespace OHOS container_->SetScrollBlankSize(35); container_->SetReboundSize(35); container_->SetDirection(1); + container_->SetMaxScrollDistance(500); // 创建 draglistener 实例并设置为拖动监听器 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 fce8c8ded..210a157db 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 @@ -62,6 +62,7 @@ #include "goalother.h" #include "ConfigModelC.h" #include "heart_blood/health_service/health_service.h" +#include "vibrator_service.h" #define DIALDATASET 1 //#include "Systemupgrade.h" @@ -549,6 +550,10 @@ void MsgCenterNotifyHfpIncomingProc(const Topic topic, Request* req) CallerLogModel::GetInstance()->SetoperateNumber(callData.number, callData.number_len); CallerLogModel::GetInstance()->SetCallSource(CallerLogModel::CallSource::CallSourcePhone); NotificationManager::GetInstance()->SetWatchCallStatus(true); + if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) + { + ui_api_vibrate_once_func(); + } } void MsgCenterNotifyHfpPhoneProc(const Topic topic, Request* req) @@ -579,6 +584,12 @@ void MsgCenterNotifyHfpPhoneProc(const Topic topic, Request* req) void MsgCenterNotifyHfpWatchHintProc(const Topic topic, Request* req) { unused(req); + + if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) + { + ui_api_vibrate_once_func(); + } + //NotificationManager::GetInstance()->SetNotifyPriority(PRIORITY_ONE); NotificationManager::GetInstance()->ShowNotify(showcallhintNotify, static_cast(topic), true); -- 2.17.1