From: hcj <1224667075@qq.com> Date: Tue, 10 Sep 2024 06:38:51 +0000 (+0800) Subject: 修复 #635低电量提醒 #500联系人页面不流畅 X-Git-Tag: release_V1.2.70_20241020_135402~514 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F930%2F1;p=mirrors%2FFD230.git 修复 #635低电量提醒 #500联系人页面不流畅 --- 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);