From: luozheng <1732036298@qq.com> Date: Thu, 19 Sep 2024 06:58:16 +0000 (+0800) Subject: 关机,恢复出厂增加震动效果,开机的震动还未加,震动强度会受设置中影响 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=d59f278d3df460faa912ffaee424128d632c73c8;p=mirrors%2FFD230.git 关机,恢复出厂增加震动效果,开机的震动还未加,震动强度会受设置中影响 --- 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; }