关机,恢复出厂增加震动效果,开机的震动还未加,震动强度会受设置中影响
authorluozheng <1732036298@qq.com>
Thu, 19 Sep 2024 06:58:16 +0000 (14:58 +0800)
committerluozheng <1732036298@qq.com>
Thu, 19 Sep 2024 06:58:16 +0000 (14:58 +0800)
code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownPresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/ShutDownImageAnimatorView.cpp
code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp

index d1263a9..90d00fa 100644 (file)
@@ -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;
         }
index 0baff6a..60db0d2 100644 (file)
@@ -9,6 +9,7 @@
 #include "wearable_log.h"
 #include <custom_utils.h>
 #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();
     }
 
     // 获取开机动画是否已经开始
index 5e5356b..8daedb0 100644 (file)
@@ -14,6 +14,7 @@
 #include "languagecode/LanguageInit.h"\r
 #include "ui_resource_string.h"\r
 #include "ConfigModel.h"\r
+#include "vibrator_service.h"\r
 namespace OHOS\r
 {\r
 \r
@@ -224,6 +225,7 @@ namespace OHOS
         }\r
         else if (strcmp(view.GetViewId(), FACTORYRESET_CHECKON) == 0) // 恢复出厂设置确认\r
         {\r
+            ui_api_vibrate_once_func(); //恢复出厂增加震动\r
             do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_TYPE_RESTORE_FACTORY_SETTING, NULL, 0);\r
             return true;\r
         }\r