From a7e29a390a9a5e5cdea421501636d5a935f6a22c Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sat, 31 Jan 2026 19:38:00 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E9=9C=87=E5=8A=A8=E6=8F=90?= =?utf8?q?=E9=86=92=EF=BC=8C=E4=BC=98=E5=8C=96=E8=AE=BE=E7=BD=AE=E9=A1=B5?= =?utf8?q?=E9=9D=A2=E9=80=89=E4=B8=AD=E8=8B=B1=E6=96=87=E5=90=8E=E9=94=99?= =?utf8?q?=E8=AF=AF=E6=98=BE=E7=A4=BA=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativelauncher/src/NativeLauncher.cpp | 3 --- .../nativeui/health/CheckAbnormalView.cpp | 4 ++-- .../nativeui/health/CheckInvalidView.cpp | 4 ++-- .../nativeui/main/src/VolumeSettingPresenter.cpp | 4 ++-- .../nativeui/record/src/RecordingModel.cpp | 2 +- .../src/RespiratoryTrainingView.cpp | 6 +++--- .../nativeui/settings/src/SettingItemView.cpp | 15 +++++++++++++-- .../src/SoundAndVibrationPresenter.cpp | 1 - .../SoundAndVibrationVolumeSettingPresenter.cpp | 2 +- .../nativeui/stress/src/stressTestModel.cpp | 8 ++++---- .../nativeui/traing/src/TraingModel.cpp | 16 ++++++++-------- .../msg_center/src/msg_center_customer.cpp | 2 +- .../msg_center/src/notify/alarm_notification.cpp | 2 +- .../src/notify/drinkReminder_notification.cpp | 9 ++++----- .../src/notify/findwatch_notification.cpp | 2 +- .../msg_center/src/notify/goal_notification.cpp | 4 ++-- .../src/notify/message_notification.cpp | 4 ++-- .../notify/motion_recognition_notification.cpp | 4 ++-- .../service/msg_center/src/notify/phone_crt.cpp | 2 +- .../notify/sedentaryReminder_notification.cpp | 4 ++-- .../msg_center/src/notify/sleep_notification.cpp | 8 ++++---- .../vibrator/service/vibrator_service.cpp | 2 +- 22 files changed, 57 insertions(+), 51 deletions(-) diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativelauncher/src/NativeLauncher.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativelauncher/src/NativeLauncher.cpp index a24d43f42..01c336eb1 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativelauncher/src/NativeLauncher.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativelauncher/src/NativeLauncher.cpp @@ -172,9 +172,6 @@ void NativeLauncher::InitNativeLauncher(LaunchMode mode) // 初始化屏幕时长 cm_initializeScreenDuration(); - // 开机增加震动 页面启动震动一次 - // custom_VibratorFunc_int(0); - // 初始化压力测试 StressTestModel::GetInstance().LoadResultFromFile(); } 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 9bf9fdd41..0ba9ac6ca 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckAbnormalView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckAbnormalView.cpp @@ -184,8 +184,8 @@ namespace OHOS if(true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { - custom_VibratorFunc_int(5); - custom_VibratorFunc_int(5); + 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 77c9cc759..ced083228 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckInvalidView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/health/CheckInvalidView.cpp @@ -245,8 +245,8 @@ namespace OHOS if(true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { // 震动提醒 - custom_VibratorFunc_int(5); - custom_VibratorFunc_int(5); + 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 afe2f2ab7..4467c77cd 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,8 +197,8 @@ bool VolumeSliderEventListener::OnRotateEnd(UIView& view, const RotateEvent& eve if (slider == progress) { ChangeVolume(VOLUMEDRAG); - custom_VibratorFunc_int(5);//受设置中震动强度控制 - custom_VibratorFunc_int(5);//受设置中震动强度控制 + 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 77f2f8454..2247daafe 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(5); + 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 26b78a4ad..0586cdeb8 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(5); + custom_VibratorFunc_int(0); 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(5); // 震动 + custom_VibratorFunc_int(0); // 震动 } 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(5); // 震动提醒 + custom_VibratorFunc_int(0); // 震动提醒 #endif } diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/settings/src/SettingItemView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/settings/src/SettingItemView.cpp index e5679530a..d2938da4a 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/settings/src/SettingItemView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/settings/src/SettingItemView.cpp @@ -9,6 +9,7 @@ #include "wearable_log.h" #include "settings/include/SettingItemView.h" #include "systemupdate/include/SystemUpdateModel.h" +#include "ConfigModel.h" namespace OHOS { static constexpr int16_t SETTING_ICON_X = 19 + 43; @@ -61,7 +62,12 @@ namespace OHOS settingLabelExt.SetVisible(true); settingLabelExt.SetPosition(SETTINGLABELEXT_X, SETTINGLABELEXT_Y, SETTINGLABELEXT_W, SETTINGLABELEXT_H); if(itemInfo.textId == STR_EPHEMERIS_DOWNLOAD){ - settingLabelExt.SetText("定位优化"); + if(ConfigModel::GetInstance()->GetLanguage() == 0){ + settingLabelExt.SetText("定位优化"); + } + else{ + settingLabelExt.SetText("Positioning Optimization"); + } } else{ settingLabelExt.SetTextId(itemInfo.textId); @@ -87,7 +93,12 @@ namespace OHOS } settingLabelExt.SetPosition(SETTINGLABELEXT_X2, SETTINGLABELEXT_Y2, SETTINGLABELEXT_W2, SETTINGLABELEXT_H2); if(itemInfo.textId == STR_EPHEMERIS_DOWNLOAD){ - settingLabelExt.SetText("定位优化"); + if(ConfigModel::GetInstance()->GetLanguage() == 0){ + settingLabelExt.SetText("定位优化"); + } + else{ + settingLabelExt.SetText("Positioning Optimization"); + } } else{ settingLabelExt.SetTextId(itemInfo.textId); 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 783e52b5c..ef7f4397e 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 @@ -133,7 +133,6 @@ namespace OHOS int VibrationMode = view_->GetVibrationModeView()->GetVibrationModePicker()->GetSelected(); WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "VibrationMode = %d", VibrationMode); SoundAndVibrationModel::GetInstance()->SetVibrationReminderToggleButtonStaus(VibrationMode); - // uapi_vibrationModeSet(VibrationMode); custom_VibratorFunc_int(0); view_->ChangeView(VIBRATIONMODEVIEW, SOUNDANDVIBRATIONVIEW); } 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 2dbff6929..03aa7e417 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(5);//受设置中震动强度控制 + 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 8cb798ae3..5488fc45a 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(5); + custom_VibratorFunc_int(0); // 亮屏 uapi_set_screen_on_api(); // 切换到失败页面 @@ -579,7 +579,7 @@ namespace OHOS // 停止压力测试 StressTest_StopTimer(); // 震动 - custom_VibratorFunc_int(5); + custom_VibratorFunc_int(0); // 亮屏 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(5); + custom_VibratorFunc_int(0); // 停止压力测试 StressTest_StopTimer(); // 切换到失败页面 @@ -616,7 +616,7 @@ namespace OHOS StressTestModel::GetInstance().SetCurrentFailType(StressTestModel::FAIL_TYPE_NOT_WORN); StressTest_StopTimer(); // 震动提醒 - custom_VibratorFunc_int(5); + 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 96e3bfc21..b9e20e010 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,8 +548,8 @@ uapi_set_screen_on_api(); // 亮屏检测 if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { - custom_VibratorFunc_int(5); - custom_VibratorFunc_int(5); + custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } if (TraingCardView::GetInstance()) { GraphicService::GetInstance()->PostGraphicEvent( @@ -1286,8 +1286,8 @@ void TraingModel::SetSportdata(SportData *data) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "目标完成"); uapi_set_screen_on_api(); // 亮屏检测 if (!OHOS::ConfigModel::GetInstance()->GetDnotdisturb()) { - custom_VibratorFunc_int(5); // 震动提示 - custom_VibratorFunc_int(5); // 震动提示 + custom_VibratorFunc_int(0); // 震动提示 + custom_VibratorFunc_int(0); // 震动提示 } if (TraingCardView::GetInstance()) { GraphicService::GetInstance()->PostGraphicEvent( @@ -1312,8 +1312,8 @@ void TraingModel::SetSportdata(SportData *data) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "目标完成"); uapi_set_screen_on_api(); // 亮屏检测 if (!OHOS::ConfigModel::GetInstance()->GetDnotdisturb()) { - custom_VibratorFunc_int(5); // 震动提示 - custom_VibratorFunc_int(5); // 震动提示 + custom_VibratorFunc_int(0); // 震动提示 + custom_VibratorFunc_int(0); // 震动提示 } if (TraingCardView::GetInstance()) { GraphicService::GetInstance()->PostGraphicEvent( @@ -1952,8 +1952,8 @@ bool TraingModel::GetMomentum() { // 振动反馈 if ((sportdata->goaldegree >= 100) && (shock_count < 4)) { shock_count++; - custom_VibratorFunc_int(5); // 触发振动反馈 - custom_VibratorFunc_int(5); + 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/msg_center_customer.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/msg_center_customer.cpp index fcca683f3..1fe7dd129 100644 --- a/code/sdk/application/wearable/fd272/service/msg_center/src/msg_center_customer.cpp +++ b/code/sdk/application/wearable/fd272/service/msg_center/src/msg_center_customer.cpp @@ -1551,7 +1551,7 @@ {TOPIC_EVENT_INACTIVITY_UPDATE, MsgCenterNotifyInactivityProc}, // {TOPIC_EVENT_INACTIVITY_ACCUMULATE_TIME_UPDATE, MsgCenterNotifyInactivityAccumulateTimeProc}, #endif - // {TOPIC_EVENT_GOAL_SHOW_VIEW, MsgCenterNotifygoalnotificationviewProc},//编译不过 + {TOPIC_EVENT_GOAL_SHOW_VIEW, MsgCenterNotifygoalnotificationviewProc}, {TOPIC_EVENT_BLE_TRANSMIT, MsgCenterNotifybleTransmit}, {TOPIC_EVENT_CHARGE_PLUG, MsgCenterNotifyChargePlugProc}, 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 eaa7454ec..ffdc01b96 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(5); + 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 8f3781b6f..69a3e4d1c 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 @@ -99,9 +99,8 @@ namespace OHOS uapi_set_screen_on_api(); if (true != ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { - // uapi_vibrationModeSet(ConfigModel::GetInstance()->GetVibrationReminder()); - custom_VibratorFunc_int(5); - custom_VibratorFunc_int(5); + custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } } @@ -252,8 +251,8 @@ namespace OHOS /* -------------------------------------------------------------------------- */ if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { - custom_VibratorFunc_int(5); // 震动一次 - custom_VibratorFunc_int(5); // 震动一次 + 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/findwatch_notification.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/findwatch_notification.cpp index 453f6e8e2..f8effa38b 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(5); + custom_VibratorFunc_int(0); } } 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 ced2cda7a..2d9870f90 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 @@ -303,8 +303,8 @@ namespace OHOS { if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { - custom_VibratorFunc_int(5); - custom_VibratorFunc_int(5); + 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 466b5e097..4a87eb6d6 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 @@ -273,8 +273,8 @@ namespace OHOS (!uapi_sleep_mode_flag_get())) { // 震动提醒 - custom_VibratorFunc_int(5); - custom_VibratorFunc_int(5); + 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 cdfc89470..37cab10d1 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 @@ -352,8 +352,8 @@ namespace OHOS // 震动一次 if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { - custom_VibratorFunc_int(5); - custom_VibratorFunc_int(5); + 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/phone_crt.cpp b/code/sdk/application/wearable/fd272/service/msg_center/src/notify/phone_crt.cpp index 016340209..ce93cf5e8 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(5); + custom_VibratorFunc_int(0); } } 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 5ccc2b253..b0587a7f3 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 @@ -288,8 +288,8 @@ namespace OHOS ScreenTurnOn(10 * 1000); // 显示时长10s if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { - custom_VibratorFunc_int(5); - custom_VibratorFunc_int(5); + 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 7450bbc75..48b658e86 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 @@ -161,8 +161,8 @@ namespace OHOS if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { - custom_VibratorFunc_int(5); - custom_VibratorFunc_int(5); + custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } ScreenTurnOn(100000); // 亮屏操作 100000ms 10秒关闭 @@ -208,8 +208,8 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Create SleepGroupView succeed!!"); if (true != OHOS::ConfigModel::GetInstance()->GetDnotdisturb() && (!uapi_sleep_mode_flag_get())) { - custom_VibratorFunc_int(5); - custom_VibratorFunc_int(5); + custom_VibratorFunc_int(0); + custom_VibratorFunc_int(0); } ScreenTurnOn(600000); // 亮屏操作 600000ms 60秒关闭 diff --git a/code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp b/code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp index 698f26e74..ca898baf2 100644 --- a/code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp +++ b/code/sdk/zhihui/drivers/vibrator/service/vibrator_service.cpp @@ -54,7 +54,7 @@ void custom_VibratorFunc_int(int vibratorType) vibrator_cmd_t mail = {0}; if(vibratorType == 4) vibmod = 4; - else if(vibratorType == 5) + else if(vibratorType == 5 || vibmod == 3) vibmod = 5; switch (vibmod) { -- 2.17.1