From d59f278d3df460faa912ffaee424128d632c73c8 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Thu, 19 Sep 2024 14:58:16 +0800 Subject: [PATCH] =?utf8?q?=E5=85=B3=E6=9C=BA=EF=BC=8C=E6=81=A2=E5=A4=8D?= =?utf8?q?=E5=87=BA=E5=8E=82=E5=A2=9E=E5=8A=A0=E9=9C=87=E5=8A=A8=E6=95=88?= =?utf8?q?=E6=9E=9C=EF=BC=8C=E5=BC=80=E6=9C=BA=E7=9A=84=E9=9C=87=E5=8A=A8?= =?utf8?q?=E8=BF=98=E6=9C=AA=E5=8A=A0=EF=BC=8C=E9=9C=87=E5=8A=A8=E5=BC=BA?= =?utf8?q?=E5=BA=A6=E4=BC=9A=E5=8F=97=E8=AE=BE=E7=BD=AE=E4=B8=AD=E5=BD=B1?= =?utf8?q?=E5=93=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../rebootandshutdown/src/RebootAndShutdownPresenter.cpp | 4 +++- .../rebootandshutdown/src/ShutDownImageAnimatorView.cpp | 4 ++++ .../wearable/fd230app/nativeui/system/src/SystemPresenter.cpp | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownPresenter.cpp index d1263a9af..90d00fad0 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownPresenter.cpp @@ -2,7 +2,7 @@ * @Author: luozheng 1732036298@qq.com * @Date: 2024-06-20 15:11:17 * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-08-29 17:39:15 + * @LastEditTime: 2024-09-19 14:21:00 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/RebootAndShutdownPresenter.cpp */ #include "AppViewIDs.h" @@ -14,6 +14,7 @@ #include "rebootandshutdown/include/RebootAndShutdownView.h" #include "rebootandshutdown/include/RebootAndShutdownModel.h" #include "dial_sos_c.h" +#include "vibrator_service.h" namespace OHOS { @@ -81,6 +82,7 @@ namespace OHOS } else if (strcmp(view.GetViewId(), FACTORY_RESET_BUTTON_CHECK_ON) == 0) // 恢复出厂设置确认 { + ui_api_vibrate_once_func(); //恢复出厂增加震动 do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_TYPE_RESTORE_FACTORY_SETTING, NULL, 0); return true; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp index 0baff6ab1..60db0d238 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp @@ -9,6 +9,7 @@ #include "wearable_log.h" #include #include "uicomponents/UIComponents.h" +#include "vibrator_service.h" namespace OHOS { @@ -71,6 +72,9 @@ namespace OHOS shutDownImageAnimatorView->Start(); isShutDownImageAnimatorStart = true; ScreenAlwaysOnCtr(OPEN_SCREEN_ALWAYS_ON);//关机动画已经开始了不能息屏 + + //关机增加震动 + ui_api_vibrate_once_func(); } // 获取开机动画是否已经开始 diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp index 5e5356b58..8daedb063 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp @@ -14,6 +14,7 @@ #include "languagecode/LanguageInit.h" #include "ui_resource_string.h" #include "ConfigModel.h" +#include "vibrator_service.h" namespace OHOS { @@ -224,6 +225,7 @@ namespace OHOS } else if (strcmp(view.GetViewId(), FACTORYRESET_CHECKON) == 0) // 恢复出厂设置确认 { + ui_api_vibrate_once_func(); //恢复出厂增加震动 do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_TYPE_RESTORE_FACTORY_SETTING, NULL, 0); return true; } -- 2.17.1