修复 #635低电量提醒 #500联系人页面不流畅 930/1
authorhcj <1224667075@qq.com>
Tue, 10 Sep 2024 06:38:51 +0000 (14:38 +0800)
committerhcj <1224667075@qq.com>
Tue, 10 Sep 2024 06:38:51 +0000 (14:38 +0800)
code/sdk/application/battery/service/battery_service.cpp
code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallerDisplayView.cpp
code/sdk/application/wearable/fd230app/nativeui/phone/src/PhoneDirView.cpp
code/sdk/application/wearable/service/msg_center/src/msg_center_customer.cpp

index 9560c83..cb16d6c 100644 (file)
@@ -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);
     }
index 13f8f23..55d1057 100644 (file)
@@ -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) {
index f436ad9..300dd8e 100644 (file)
@@ -388,6 +388,7 @@ namespace OHOS
         container_->SetScrollBlankSize(35);\r
         container_->SetReboundSize(35);\r
         container_->SetDirection(1);\r
+        container_->SetMaxScrollDistance(500);\r
 \r
 \r
         // 创建 draglistener 实例并设置为拖动监听器\r
index fce8c8d..210a157 100644 (file)
@@ -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<uint16_t>(topic), true);