From: luozheng <1732036298@qq.com> Date: Fri, 6 Dec 2024 09:35:15 +0000 (+0800) Subject: 修改SOS拨号功能键触发秒数为2s X-Git-Tag: v1.3.113-repair_tp~143^2~21 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=c16da29a1fd70462c6e9224f05f8c81548cbd0ad;p=mirrors%2FFD230.git 修改SOS拨号功能键触发秒数为2s --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp index f42b0f4c0..5f2bbcae4 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownModel.cpp @@ -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);