修改SOS拨号功能键触发秒数为2s
authorluozheng <1732036298@qq.com>
Fri, 6 Dec 2024 09:35:15 +0000 (17:35 +0800)
committerluozheng <1732036298@qq.com>
Fri, 6 Dec 2024 09:35:15 +0000 (17:35 +0800)
code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp

index f42b0f4..5f2bbca 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-07-18 14:55:27
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-11-30 15:21:59
+ * @LastEditTime: 2024-12-06 17:26:44
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp
  */
 
@@ -323,14 +323,15 @@ namespace OHOS
 
     static void HandFuncKeyOnLongPress(void)
     {
-        GraphicService::GetInstance()->PostGraphicEvent(std::bind(SOSKeyLongPress));
+        // GraphicService::GetInstance()->PostGraphicEvent(std::bind(SOSKeyLongPress));
+        SOSKeyLongPress();
     }
 
-    /*注册功能键的长按(8s)事件*/
+    /*注册功能键的长按事件*/
     bool RebootAndShutdownModel::RegisterFuncKeyLongPressEvent(void)
     {
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RebootAndShutdownModel::RegisterFuncKeyLongPressEvent");
-        int32_t ret = uapi_button_register_event_cb(SOSKeyLongPress, BUTTON1_LONGPRESS_3S);
+        int32_t ret = uapi_button_register_event_cb(SOSKeyLongPress, BUTTON1_LONGPRESS_2S);
         if (ret != ERRCODE_SUCC)
         {
             WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Register PowerKey LongPress Event error, ret = %d", ret);