From 2771e3cc11506ea2ff6f3fab3417bbef93e6a65d Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Thu, 5 Feb 2026 11:46:07 +0800 Subject: [PATCH] =?utf8?q?=E5=A2=9E=E5=8A=A0=E9=9C=87=E5=8A=A8=E6=AC=A1?= =?utf8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/displaybrightness/src/BrightnessControlView.cpp | 1 + .../fd272/nativeapp/nativeui/health/CheckAbnormalView.cpp | 1 + .../fd272/nativeapp/nativeui/health/CheckInvalidView.cpp | 1 + .../nativeapp/nativeui/main/src/VolumeSettingPresenter.cpp | 1 + .../fd272/nativeapp/nativeui/record/src/RecordingModel.cpp | 1 + .../respiratorytraining/src/RespiratoryTrainingView.cpp | 3 +++ .../soundandvibration/src/SoundAndVibrationPresenter.cpp | 1 + .../src/SoundAndVibrationVolumeSettingPresenter.cpp | 1 + .../fd272/nativeapp/nativeui/stress/src/stressTestModel.cpp | 4 ++++ .../fd272/nativeapp/nativeui/traing/src/TraingModel.cpp | 4 ++++ .../service/msg_center/src/notify/alarm_notification.cpp | 1 + .../msg_center/src/notify/drinkReminder_notification.cpp | 2 ++ .../fd272/service/msg_center/src/notify/goal_notification.cpp | 1 + .../service/msg_center/src/notify/message_notification.cpp | 1 + .../msg_center/src/notify/motion_recognition_notification.cpp | 1 + .../msg_center/src/notify/sedentaryReminder_notification.cpp | 1 + .../service/msg_center/src/notify/sleep_notification.cpp | 2 ++ code/sdk/zhihui/config/src/ConfigModel.cpp | 1 + code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp | 1 + .../services/ble_service/blemoder/bleinstruct_sample.cpp | 2 ++ 20 files changed, 31 insertions(+) diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/displaybrightness/src/BrightnessControlView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/displaybrightness/src/BrightnessControlView.cpp index b81c70187..7c508da60 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/displaybrightness/src/BrightnessControlView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/displaybrightness/src/BrightnessControlView.cpp @@ -314,6 +314,7 @@ namespace OHOS { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "OnRotateEnd %d", value); custom_VibratorFunc_int(0);//受设置中震动强度控制 + custom_VibratorFunc_int(0);//受设置中震动强度控制 return true; } } diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckAbnormalView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckAbnormalView.cpp index 0ba9ac6ca..7b056b945 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckAbnormalView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckAbnormalView.cpp @@ -186,6 +186,7 @@ namespace OHOS { custom_VibratorFunc_int(0); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } // 增加按键监听 diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckInvalidView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckInvalidView.cpp index ced083228..9fe491cf5 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckInvalidView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckInvalidView.cpp @@ -247,6 +247,7 @@ namespace OHOS // 震动提醒 custom_VibratorFunc_int(0); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } // 增加按键监听 diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/src/VolumeSettingPresenter.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/src/VolumeSettingPresenter.cpp index 4467c77cd..50332e233 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/src/VolumeSettingPresenter.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/main/src/VolumeSettingPresenter.cpp @@ -199,6 +199,7 @@ bool VolumeSliderEventListener::OnRotateEnd(UIView& view, const RotateEvent& eve ChangeVolume(VOLUMEDRAG); custom_VibratorFunc_int(0);//受设置中震动强度控制 custom_VibratorFunc_int(0);//受设置中震动强度控制 + custom_VibratorFunc_int(0);//受设置中震动强度控制 } } return true; diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/record/src/RecordingModel.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/record/src/RecordingModel.cpp index 2247daafe..88205e0d2 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/record/src/RecordingModel.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/record/src/RecordingModel.cpp @@ -1123,6 +1123,7 @@ namespace OHOS { // 震动提醒 custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } RecordingPresenter::GetInstance()->StopRecord(); // 停止录制 RecordingPresenter::GetInstance()->showWarning(); // 显示警告 diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/respiratorytraining/src/RespiratoryTrainingView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/respiratorytraining/src/RespiratoryTrainingView.cpp index 0586cdeb8..f29eb1760 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/respiratorytraining/src/RespiratoryTrainingView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/respiratorytraining/src/RespiratoryTrainingView.cpp @@ -201,6 +201,7 @@ namespace OHOS } // 震动提醒 custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); breath->ForceResetText(); } } @@ -245,6 +246,7 @@ namespace OHOS HeartModel::GetInstance()->Heart_Control(HeartState::Start, HeartCheck::INITIATIVE); // 开启心率检测 RespiratoryTrainingModel::GetInstance().RT_StartTimer(RespiratoryTrainingModel::GetInstance().GetRespiratoryTrainingTime()); // 开启定时器 custom_VibratorFunc_int(0); // 震动 + custom_VibratorFunc_int(0); // 震动 } bool RespiratoryTrainingView::OnClick(UIView &view, const ClickEvent &event) @@ -482,6 +484,7 @@ namespace OHOS HeartModel::GetInstance()->Heart_Control(HeartState::Start, HeartCheck::INITIATIVE); // 开启心率检测 RespiratoryTrainingModel::GetInstance().RT_StartTimer(ONE_MIN); // 开启一个一分钟的定时器 custom_VibratorFunc_int(0); // 震动提醒 + custom_VibratorFunc_int(0); // 震动提醒 #endif } diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationPresenter.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationPresenter.cpp index ef7f4397e..b449c7a9a 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationPresenter.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationPresenter.cpp @@ -134,6 +134,7 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VibrationMode = %d", VibrationMode); SoundAndVibrationModel::GetInstance()->SetVibrationReminderToggleButtonStaus(VibrationMode); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); view_->ChangeView(VIBRATIONMODEVIEW, SOUNDANDVIBRATIONVIEW); } return true; diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationVolumeSettingPresenter.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationVolumeSettingPresenter.cpp index 03aa7e417..a2b274a61 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationVolumeSettingPresenter.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/soundandvibration/src/SoundAndVibrationVolumeSettingPresenter.cpp @@ -205,6 +205,7 @@ namespace OHOS { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VoumeProcessSliderEventListener::OnRotateEnd,%d",event.GetRotate()); custom_VibratorFunc_int(0);//受设置中震动强度控制 + custom_VibratorFunc_int(0);//受设置中震动强度控制 return true; } } diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/stress/src/stressTestModel.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/stress/src/stressTestModel.cpp index 17dffb01d..7452169a0 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/stress/src/stressTestModel.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/stress/src/stressTestModel.cpp @@ -535,6 +535,7 @@ namespace OHOS StressTest_StopTimer(); // 震动提醒 custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); // 亮屏 uapi_set_screen_on_api(); // 切换到失败页面 @@ -596,6 +597,7 @@ namespace OHOS StressTest_StopTimer(); // 震动 custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); // 亮屏 uapi_set_screen_on_api(); return; @@ -608,6 +610,7 @@ namespace OHOS StressTestModel::GetInstance().SetCurrentFailType(StressTestModel::FAIL_TYPE_INVALID_DATA); // 震动提醒 custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); // 停止压力测试 StressTest_StopTimer(); // 切换到失败页面 @@ -633,6 +636,7 @@ namespace OHOS StressTest_StopTimer(); // 震动提醒 custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); // 切换到失败页面 if (StressTestPresenter::GetInstance()) { diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/traing/src/TraingModel.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/traing/src/TraingModel.cpp index f372e4eab..f961af0e7 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/traing/src/TraingModel.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/traing/src/TraingModel.cpp @@ -551,6 +551,7 @@ (!uapi_sleep_mode_flag_get())) { custom_VibratorFunc_int(0); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } if (TraingCardView::GetInstance()) { GraphicService::GetInstance()->PostGraphicEvent( @@ -1289,6 +1290,7 @@ void TraingModel::SetSportdata(SportData *data) { if (!OHOS::ConfigModel::GetInstance()->GetDnotdisturb()) { custom_VibratorFunc_int(0); // 震动提示 custom_VibratorFunc_int(0); // 震动提示 + custom_VibratorFunc_int(0); // 震动提示 } if (TraingCardView::GetInstance()) { GraphicService::GetInstance()->PostGraphicEvent( @@ -1315,6 +1317,7 @@ void TraingModel::SetSportdata(SportData *data) { if (!OHOS::ConfigModel::GetInstance()->GetDnotdisturb()) { custom_VibratorFunc_int(0); // 震动提示 custom_VibratorFunc_int(0); // 震动提示 + custom_VibratorFunc_int(0); // 震动提示 } if (TraingCardView::GetInstance()) { GraphicService::GetInstance()->PostGraphicEvent( @@ -1970,6 +1973,7 @@ bool TraingModel::GetMomentum() { shock_count++; custom_VibratorFunc_int(0); // 触发振动反馈 custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "触发了振动。振动计数: %d", shock_count); } diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/alarm_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/alarm_notification.cpp index ffdc01b96..2141142a5 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/alarm_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/alarm_notification.cpp @@ -119,6 +119,7 @@ namespace OHOS if (g_alarmView) { custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } } } diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/drinkReminder_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/drinkReminder_notification.cpp index 69a3e4d1c..848e639e5 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/drinkReminder_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/drinkReminder_notification.cpp @@ -101,6 +101,7 @@ namespace OHOS { custom_VibratorFunc_int(0); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } } @@ -253,6 +254,7 @@ namespace OHOS { custom_VibratorFunc_int(0); // 震动一次 custom_VibratorFunc_int(0); // 震动一次 + custom_VibratorFunc_int(0); // 震动一次 } ScreenTurnOn(10 * 1000); // 亮屏操作 10秒关闭 diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/goal_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/goal_notification.cpp index e716f4ead..33915881b 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/goal_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/goal_notification.cpp @@ -292,6 +292,7 @@ namespace OHOS { custom_VibratorFunc_int(0); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } } if (GoalviewShowCallBack_FALG == 0) diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/message_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/message_notification.cpp index 4a87eb6d6..1fe157532 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/message_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/message_notification.cpp @@ -275,6 +275,7 @@ namespace OHOS // 震动提醒 custom_VibratorFunc_int(0); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } MessageViewEventListener::GetInstance() diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/motion_recognition_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/motion_recognition_notification.cpp index 37cab10d1..bff2e6baa 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/motion_recognition_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/motion_recognition_notification.cpp @@ -354,6 +354,7 @@ namespace OHOS { custom_VibratorFunc_int(0); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } /* -------------------------------------------------------------------------- */ NotificationManager::GetInstance()->RegisterNotifyCleanupFunction(FreeMotionRecognitionView); diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/sedentaryReminder_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/sedentaryReminder_notification.cpp index b0587a7f3..4c0dfe8d4 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/sedentaryReminder_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/sedentaryReminder_notification.cpp @@ -290,6 +290,7 @@ namespace OHOS { custom_VibratorFunc_int(0); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } /* -------------------------------------------------------------------------- */ NotificationManager::GetInstance()->RegisterNotifyCleanupFunction(FreeSedentaryReminderView); diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/sleep_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/sleep_notification.cpp index 48b658e86..76745c698 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/sleep_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/sleep_notification.cpp @@ -163,6 +163,7 @@ namespace OHOS { custom_VibratorFunc_int(0); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } ScreenTurnOn(100000); // 亮屏操作 100000ms 10秒关闭 @@ -210,6 +211,7 @@ namespace OHOS { custom_VibratorFunc_int(0); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } ScreenTurnOn(600000); // 亮屏操作 600000ms 60秒关闭 diff --git a/code/sdk/zhihui/config/src/ConfigModel.cpp b/code/sdk/zhihui/config/src/ConfigModel.cpp index f09500846..b3a0b3fb6 100644 --- a/code/sdk/zhihui/config/src/ConfigModel.cpp +++ b/code/sdk/zhihui/config/src/ConfigModel.cpp @@ -1415,6 +1415,7 @@ void cm_initializeVibrationModel(void) int value = OHOS::ConfigModel::GetInstance()->GetVibrationReminder(); // uapi_vibrationModeSet(value); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } void cm_initializeSilentModel(void) diff --git a/code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp b/code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp index ca898baf2..085246f6c 100644 --- a/code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp +++ b/code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp @@ -255,6 +255,7 @@ errcode_t uapi_vibrator_service_init(void) /* ---------------------------------- 开机震动一次 ---------------------------------- */ #ifdef BOARD_FD272 custom_VibratorFunc_int(5); + custom_VibratorFunc_int(5); #else custom_VibratorFunc_int(0); #endif diff --git a/code/sdk/zhihui/services/ble_service/blemoder/bleinstruct_sample.cpp b/code/sdk/zhihui/services/ble_service/blemoder/bleinstruct_sample.cpp index 1c555a118..ff13f6c17 100644 --- a/code/sdk/zhihui/services/ble_service/blemoder/bleinstruct_sample.cpp +++ b/code/sdk/zhihui/services/ble_service/blemoder/bleinstruct_sample.cpp @@ -2162,6 +2162,7 @@ void set_vibrationremiander(uint8_t falg)//设置震动模式 p_ConfigModel->SetVibrationReminder(falg); // uapi_vibrationModeSet(falg); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); SendMsgToUIService(UI_UPDATE_VIBRATION_MODE,0,nullptr,0); return ; } @@ -3837,6 +3838,7 @@ void set_vibrationremiander(uint8_t falg)//设置震动模式 p_ConfigModel->SetVibrationReminder(falg); // uapi_vibrationModeSet(falg); custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); return ; } -- 2.17.1