From: luozheng <1732036298@qq.com> Date: Thu, 29 Jan 2026 08:48:19 +0000 (+0800) Subject: 震动强度修改 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=31119af88b14736158688d3f7a949e6e7f05b110;p=mirrors%2FFD230.git 震动强度修改 --- 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 e9b578f94..9bf9fdd41 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckAbnormalView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckAbnormalView.cpp @@ -184,7 +184,8 @@ namespace OHOS if(true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { - custom_VibratorFunc_int(0); + custom_VibratorFunc_int(5); + custom_VibratorFunc_int(5); } // 增加按键监听 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 727f9cbe5..77c9cc759 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckInvalidView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckInvalidView.cpp @@ -245,7 +245,8 @@ namespace OHOS if(true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { // 震动提醒 - custom_VibratorFunc_int(0); + custom_VibratorFunc_int(5); + custom_VibratorFunc_int(5); } // 增加按键监听 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 a49cab77a..afe2f2ab7 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 @@ -197,7 +197,8 @@ bool VolumeSliderEventListener::OnRotateEnd(UIView& view, const RotateEvent& eve if (slider == progress) { ChangeVolume(VOLUMEDRAG); - custom_VibratorFunc_int(0);//受设置中震动强度控制 + custom_VibratorFunc_int(5);//受设置中震动强度控制 + custom_VibratorFunc_int(5);//受设置中震动强度控制 } } return true; diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/rebootandshutdown/src/RebootAndShutdownPresenter.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/rebootandshutdown/src/RebootAndShutdownPresenter.cpp index f92836af4..7315eb7be 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/rebootandshutdown/src/RebootAndShutdownPresenter.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/rebootandshutdown/src/RebootAndShutdownPresenter.cpp @@ -91,7 +91,7 @@ namespace OHOS } else if (strcmp(view.GetViewId(), FACTORY_RESET_BUTTON_CHECK_ON) == 0) // 恢复出厂设置确认 { - custom_VibratorFunc_int(0); //恢复出厂增加震动 + custom_VibratorFunc_int(5); //恢复出厂增加震动 view_->ChangeView(FACTORYRESET, SHUTDOWNANIMATOR); ShutDownImageAnimatorView::GetInstance()->ShutDownImageAnimator_Start(2); isShutDownImageAnimatorStart = 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..77f2f8454 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 @@ -1122,7 +1122,7 @@ namespace OHOS if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { // 震动提醒 - custom_VibratorFunc_int(0); + custom_VibratorFunc_int(5); } 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..26b78a4ad 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 @@ -200,7 +200,7 @@ namespace OHOS breath->SetTextId(STR_EXHALE_NOW); } // 震动提醒 - custom_VibratorFunc_int(0); + custom_VibratorFunc_int(5); breath->ForceResetText(); } } @@ -244,7 +244,7 @@ namespace OHOS StartRespiratoryTraining(); // 开始呼吸训练 HeartModel::GetInstance()->Heart_Control(HeartState::Start, HeartCheck::INITIATIVE); // 开启心率检测 RespiratoryTrainingModel::GetInstance().RT_StartTimer(RespiratoryTrainingModel::GetInstance().GetRespiratoryTrainingTime()); // 开启定时器 - custom_VibratorFunc_int(0); // 震动 + custom_VibratorFunc_int(5); // 震动 } bool RespiratoryTrainingView::OnClick(UIView &view, const ClickEvent &event) @@ -481,7 +481,7 @@ namespace OHOS StartRespiratoryTraining(); // 开始呼吸训练 HeartModel::GetInstance()->Heart_Control(HeartState::Start, HeartCheck::INITIATIVE); // 开启心率检测 RespiratoryTrainingModel::GetInstance().RT_StartTimer(ONE_MIN); // 开启一个一分钟的定时器 - custom_VibratorFunc_int(0); // 震动提醒 + custom_VibratorFunc_int(5); // 震动提醒 #endif } 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..2dbff6929 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 @@ -204,7 +204,7 @@ namespace OHOS bool VoumeProcessSliderEventListener::OnRotateEnd(UIView& view, const RotateEvent& event) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VoumeProcessSliderEventListener::OnRotateEnd,%d",event.GetRotate()); - custom_VibratorFunc_int(0);//受设置中震动强度控制 + custom_VibratorFunc_int(5);//受设置中震动强度控制 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 5488fc45a..8cb798ae3 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 @@ -518,7 +518,7 @@ namespace OHOS StressTestModel::GetInstance().SetCurrentFailType(StressTestModel::FAIL_TYPE_INVALID_DATA); StressTest_StopTimer(); // 震动提醒 - custom_VibratorFunc_int(0); + custom_VibratorFunc_int(5); // 亮屏 uapi_set_screen_on_api(); // 切换到失败页面 @@ -579,7 +579,7 @@ namespace OHOS // 停止压力测试 StressTest_StopTimer(); // 震动 - custom_VibratorFunc_int(0); + custom_VibratorFunc_int(5); // 亮屏 uapi_set_screen_on_api(); return; @@ -591,7 +591,7 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "压力测试: 有效数据不足 ringBufferIndex:%d", ringBufferIndex); StressTestModel::GetInstance().SetCurrentFailType(StressTestModel::FAIL_TYPE_INVALID_DATA); // 震动提醒 - custom_VibratorFunc_int(0); + custom_VibratorFunc_int(5); // 停止压力测试 StressTest_StopTimer(); // 切换到失败页面 @@ -616,7 +616,7 @@ namespace OHOS StressTestModel::GetInstance().SetCurrentFailType(StressTestModel::FAIL_TYPE_NOT_WORN); StressTest_StopTimer(); // 震动提醒 - custom_VibratorFunc_int(0); + custom_VibratorFunc_int(5); // 切换到失败页面 if (StressTestPresenter::GetInstance()) { diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/system/src/SystemPresenter.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/system/src/SystemPresenter.cpp index fdd3fbec6..1bf344a1a 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/system/src/SystemPresenter.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/system/src/SystemPresenter.cpp @@ -230,7 +230,7 @@ namespace OHOS } else if (strcmp(view.GetViewId(), FACTORYRESET_CHECKON) == 0) // 恢复出厂设置确认 { - custom_VibratorFunc_int(0); //恢复出厂增加震动 + custom_VibratorFunc_int(5); //恢复出厂增加震动 p_SystemView->ChangeView(FACTORYRESETVIEW, SHUTDOWNANIMATIONVIEW); ShutDownImageAnimatorView::GetInstance()->ShutDownImageAnimator_Start(2); isShutDownImageAnimatorStart = true; 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 aafcf1cdd..2df1f6f39 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 @@ -548,7 +548,7 @@ uapi_set_screen_on_api(); // 亮屏检测 if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { - custom_VibratorFunc_int(0); + custom_VibratorFunc_int(5); } if (TraingCardView::GetInstance()) { GraphicService::GetInstance()->PostGraphicEvent( @@ -1285,7 +1285,7 @@ void TraingModel::SetSportdata(SportData *data) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "目标完成"); uapi_set_screen_on_api(); // 亮屏检测 if (!OHOS::ConfigModel::GetInstance()->GetDnotdisturb()) { - custom_VibratorFunc_int(0); // 震动提示 + custom_VibratorFunc_int(5); // 震动提示 } if (TraingCardView::GetInstance()) { GraphicService::GetInstance()->PostGraphicEvent( @@ -1310,7 +1310,7 @@ void TraingModel::SetSportdata(SportData *data) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "目标完成"); uapi_set_screen_on_api(); // 亮屏检测 if (!OHOS::ConfigModel::GetInstance()->GetDnotdisturb()) { - custom_VibratorFunc_int(0); // 震动提示 + custom_VibratorFunc_int(5); // 震动提示 } if (TraingCardView::GetInstance()) { GraphicService::GetInstance()->PostGraphicEvent( @@ -1934,7 +1934,7 @@ bool TraingModel::GetMomentum() { // 振动反馈 if ((sportdata->goaldegree >= 100) && (shock_count < 4)) { shock_count++; - custom_VibratorFunc_int(0); // 触发振动反馈 + custom_VibratorFunc_int(5); // 触发振动反馈 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..eaa7454ec 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 @@ -118,7 +118,7 @@ namespace OHOS // } if (g_alarmView) { - custom_VibratorFunc_int(0); + custom_VibratorFunc_int(5); } } } 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 4f5f10c6a..8f3781b6f 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 { // uapi_vibrationModeSet(ConfigModel::GetInstance()->GetVibrationReminder()); custom_VibratorFunc_int(5); + custom_VibratorFunc_int(5); } } @@ -252,6 +253,7 @@ namespace OHOS if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { custom_VibratorFunc_int(5); // 震动一次 + custom_VibratorFunc_int(5); // 震动一次 } ScreenTurnOn(10 * 1000); // 亮屏操作 10秒关闭 diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/findwatch_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/findwatch_notification.cpp index f8effa38b..453f6e8e2 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/findwatch_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/findwatch_notification.cpp @@ -106,7 +106,7 @@ namespace OHOS { if (nullptr != FindWatchGroupView) { - custom_VibratorFunc_int(0); + custom_VibratorFunc_int(5); } } 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 57033ef0b..ced2cda7a 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 @@ -304,6 +304,7 @@ namespace OHOS if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { custom_VibratorFunc_int(5); + custom_VibratorFunc_int(5); } } 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 8fbbab6bb..466b5e097 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 @@ -274,6 +274,7 @@ namespace OHOS { // 震动提醒 custom_VibratorFunc_int(5); + custom_VibratorFunc_int(5); } 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 a2ab5c34c..cdfc89470 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 @@ -353,6 +353,7 @@ namespace OHOS if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { custom_VibratorFunc_int(5); + custom_VibratorFunc_int(5); } /* -------------------------------------------------------------------------- */ NotificationManager::GetInstance()->RegisterNotifyCleanupFunction(FreeMotionRecognitionView); diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/pairing_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/pairing_notification.cpp index 1d8a68602..93efab2c4 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/pairing_notification.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/pairing_notification.cpp @@ -395,6 +395,7 @@ namespace OHOS if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { custom_VibratorFunc_int(5); + custom_VibratorFunc_int(5); } ScreenTurnOn(40 * 1000); // 亮屏操作 40秒关闭 @@ -557,6 +558,7 @@ namespace OHOS if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { custom_VibratorFunc_int(5); // 震动一次 + custom_VibratorFunc_int(5); // 震动一次 } ScreenTurnOff(); //先设置为0 diff --git a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/phone_crt.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/phone_crt.cpp index ce93cf5e8..016340209 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/notify/phone_crt.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/phone_crt.cpp @@ -863,7 +863,7 @@ void phone_VibratorFunc(void) { if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { - custom_VibratorFunc_int(0); + custom_VibratorFunc_int(5); } } 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 d604fa5a1..5ccc2b253 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 @@ -289,6 +289,7 @@ namespace OHOS if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { custom_VibratorFunc_int(5); + custom_VibratorFunc_int(5); } /* -------------------------------------------------------------------------- */ 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 9587348fe..7450bbc75 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 @@ -162,6 +162,7 @@ namespace OHOS if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { custom_VibratorFunc_int(5); + custom_VibratorFunc_int(5); } ScreenTurnOn(100000); // 亮屏操作 100000ms 10秒关闭 @@ -208,6 +209,7 @@ namespace OHOS if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { custom_VibratorFunc_int(5); + custom_VibratorFunc_int(5); } ScreenTurnOn(600000); // 亮屏操作 600000ms 60秒关闭